Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript on click hide

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #250993
    Manojnaanak
    Participant

    hello all,

    i am sharing a piece of code in which i have created a menu which have a drop down menu it is going good. but i want to add a function when anyone click anywhere on page it should be slide up.

    thanks in advance

    $(document).ready(function(){
    $('#dropList').click(function(event) {
    
      if ($(window).width() 
    
    
        <ul class="main-navi">
    
                    <li><a href="#"><span></span>Register Kit</a></li>
                    &lt;li class="relative"&gt;<a href="#"><span></span>&lt;sup class="noti-count"&gt;8&lt;/sup&gt;Notifications</a></li>
                    <li>
                        <a href="#"><span><img src="images/user-img.png" alt="user" /></span>Hello, John!<span></span></a>
                        &lt;ul class="dropListMenu"&gt;
                            <li><a href="#"><span></span> Profile</a></li>
                            <li><a href="#"><span></span>Content</a></li>
                            <li><a href="#"><span></span>Log out</a></li>
                        </ul>
                    </li>
                </ul>
    

    “`

    #251230
    Beverleyh
    Participant

    I think you’ve forgotten half your code. If you provide what you have in a CodePen demo we can take a look at the part that isn’t working.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.