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

right side toggle by js, toggle from ride side by js, toggle js for website, form toggle from right side js, js for form toggle from right side