Created
August 6, 2014 04:41
-
-
Save tridungpham/7c121c091c2ffcc2c5a9 to your computer and use it in GitHub Desktop.
test js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
var divs=$('.sbSubLitsIt .listIt').hide(); | |
var divs2=$('.sbListIt .sbSubList').hide(); | |
jQuery('.sbSubLitsIt').each(function(){ | |
if(jQuery(this).find('.listIt').length){ | |
jQuery(this).find('.clShowCapNone').addClass('clShowCap'); | |
} | |
}); | |
jQuery('.sbListIt').each(function(){ | |
if(jQuery(this).find('.sbSubList').length){ | |
jQuery(this).find('.clShowNone ').addClass('clShow '); | |
} | |
}); | |
var span=$('.sbSubLitsIt .clShowCap ').click(function (e) { | |
e.stopPropagation(); | |
$(this).toggleClass('ac') | |
$(this).parent().next().slideToggle(); | |
$(this).closest('.sbSubLitsIt').toggleClass('clAc'); | |
return false; | |
}); | |
var span2=$('.sbListIt .clShow ').click(function () { | |
$(this).toggleClass('ac') | |
$(this).parent().next().slideToggle() | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment