From HEXONET Wiki
(21 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
− | |||
$j(document).ready( function() { | $j(document).ready( function() { | ||
− | // $j(' | + | // 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( | + | $j('.collapse-items').on('mouseleave', function() { |
− | + | $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'); }); });