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

Comments

Popular posts from this blog

50 Beautiful Color Palettes for Your Next Web Project

Website Color Palettes: The Palettes of 50 Visually Impactful Websites to Inspire You Css Zilla