Javascript problem with double clicks

  • Simulator
  • Born
  • Born
  • Simulator
  • Posts: 1

Post 3+ Months Ago

Hi!

I just have a little bug with my code, it only works, if i double click on the link.

I have several links, but still problems with the double clicks. I want the code works properly, so i only want to click on a link once to open the panel of the menulink and switch it back if i click on another. Can someone help me?

JAVASCRIPT Code: [ Select ]
 
 
<script type="text/javascript">
 
 
$(document).ready(function(){
 
$(".lap1slide").click(function(){
$("#panel").slideToggle("5500");
$(this).toggleClass("active"); return true;
});
 
});
 
 
 
</script>
 
<a href="#" class="lap1slide"><img src="images/menu-felirat-rolunk.png" border="0"></a>
 
<a href="#" class="lap1slide"><img src="images/menu-felirat-azzw.png" border="0"></a>
 
<a href="#" class="lap1slide"><img src="images/menu-felirat-cdfs.png" border="0"></a>
 
 
  1.  
  2.  
  3. <script type="text/javascript">
  4.  
  5.  
  6. $(document).ready(function(){
  7.  
  8. $(".lap1slide").click(function(){
  9. $("#panel").slideToggle("5500");
  10. $(this).toggleClass("active"); return true;
  11. });
  12.  
  13. });
  14.  
  15.  
  16.  
  17. </script>
  18.  
  19. <a href="#" class="lap1slide"><img src="images/menu-felirat-rolunk.png" border="0"></a>
  20.  
  21. <a href="#" class="lap1slide"><img src="images/menu-felirat-azzw.png" border="0"></a>
  22.  
  23. <a href="#" class="lap1slide"><img src="images/menu-felirat-cdfs.png" border="0"></a>
  24.  
  25.  
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

Do you have a link so I can try it out?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.