Jump to content

jQuery toggle doesn't stay down?


dmhall0

Recommended Posts

I am using the jQuery toggle function to display a menu when the user clicks on an image.

The menu starts off hidden but when I click on the image it appears correctly, lasts less than 1 second, and then hides again.

 

Here is my js/jquery code:

 

<script type="text/javascript" src="'.base_url().'assets/jquery/js/jquery-1.7.2.min.js"></script>
             <script type="text/javascript" src="'.base_url().'assets/jquery/js/jquery-ui-1.8.21.custom.min.js"></script>
             <script type="text/javascript">
             $("document").ready(function() {
               $("#user_menu").hide();
               $("a.menu_title").click(function()
               {
                 $("#user_menu").toggle();
               });
             });</script>

 

Any ideas why this is happening?

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/265995-jquery-toggle-doesnt-stay-down/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.