From HEXONET Wiki
(8 intermediate revisions by one user not shown) | |||
Line 8: | Line 8: | ||
// Show collapsed TLDs on mouseeneter | // Show collapsed TLDs on mouseeneter | ||
$j('.collapse-head p a').on('mouseenter', function() { | $j('.collapse-head p a').on('mouseenter', function() { | ||
− | $j('.collapse-items').show(); | + | $j(this).css('z-index','999'); |
+ | $j(this).parents().next('.collapse-items').css('z-index', '10').show(); | ||
}); | }); | ||
$j('.collapse-items').on('mouseleave', function() { | $j('.collapse-items').on('mouseleave', function() { | ||
− | $j( | + | $j(this).css('z-index', '0').hide(); |
+ | $j(this).prev().find('a').css('z-index','0'); | ||
}); | }); | ||
+ | |||
}); | }); |
Latest revision as of 20:25, 6 March 2014
/* Any JavaScript here will be loaded for all users on every page load. */ $j(document).ready( function() { // Hide collapsed TLDs $j('.collapse-items').hide(); // Show collapsed TLDs on mouseeneter $j('.collapse-head p a').on('mouseenter', function() { $j(this).css('z-index','999'); $j(this).parents().next('.collapse-items').css('z-index', '10').show(); }); $j('.collapse-items').on('mouseleave', function() { $j(this).css('z-index', '0').hide(); $j(this).prev().find('a').css('z-index','0'); }); });