Select the child of any parent with jquery
Select the child of any parent with jquery
Note :- here #badcredit2 is parent id and #menu-bank-accounts-drop-down-1 is child.
By this Jquery code you cand select the child element of any parent element.
<script type="text/javascript">
$(document).ready(function(){
$("#badcredit2").click(function(){
if($('div:has(> ul)'))
$("#menu-bank-accounts-drop-down-1").slideToggle("slow");
else
alert('no');
});
});
</script>
Thanks
Css Zilla Team
Note :- here #badcredit2 is parent id and #menu-bank-accounts-drop-down-1 is child.
By this Jquery code you cand select the child element of any parent element.
<script type="text/javascript">
$(document).ready(function(){
$("#badcredit2").click(function(){
if($('div:has(> ul)'))
$("#menu-bank-accounts-drop-down-1").slideToggle("slow");
else
alert('no');
});
});
</script>
Thanks
Css Zilla Team
Comments
Post a Comment