hi, 

im using a few prebuilt scripts together, namely 
jQuery easing plugin from http://gsgd.co.uk/sandbox/jquery.easing.php
and
jQuery Tooltip by Jörn Zaefferer (http://bassistance.de)

I have an unordered list of images all floated left and displayed inline
with absolute positioning and tpo and left margins to make them look random.
All is well, I was just hoping somone would have a more elegant solution to
swapping z-index on the 30 or so images on .hover in/out states.

code:

var my_zIndex;
var method = 'expoout';
$(document).ready(function() {
        $("#polaroids").find("img").each(function(i){
                my_zIndex = document.getElementById(this.id).style.zIndex;
                $(this).Tooltip({extraClass: "fancy",fixPNG: true});
                        $(this).hover(
                                function() { 
                                        $(this).animate({width:90,height:90}, 
{duration: 500, easeMethod:
method});
                                        $(this).css({zIndex: my_zIndex+500});
                                }
                                ,function() { 
                                        $(this).animate({width:80,height:80}, 
{duration: 500, easeMethod:
method});
                                        $(this).css("z-index",my_zIndex); 
                                }
                        );         
        });
});
                $(function() {
// modify global settings
$.extend($.fn.Tooltip.defaults, {
        track: false,
        delay: 500,
        showURL: false,
        showBody: " - "
});

});

any help is muchly appreciated :) thanks!
-- 
View this message in context: 
http://www.nabble.com/swap-z-indexes-tf2732391.html#a7621590
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to