jquery - Avoid rapid clicking on button in website -


I'm working on the HTML part To click on that button I have a button, press TogglesSlide () on the div.
If I click on that button fast 4-5 times drop down, then sometimes I get annoyed, I want to avoid it.
Thanks in advance.

  & lt; Button name = "dropdown" id = "dropdown" /> & Lt; Div id = "dropdown1" & gt; Dropdown text here & lt; / Div & gt; Click here for $ {document} ($ {"(" # dropdown ") (function () {$ (" # Dropdown 1 "). TogglesSlide ();})})   

Problem: On a click several times in a moment (faster) it clicks the button as much as I Clicked.

There is no need to cancel clicks, you need animation

 

$ ("# dropdown").;});
  # dropdown 1 {height: 200px; Background color: yellow; }   
  & lt; Script src = "https://ajax.googleapis.com/ajax/libs/JQuery/1.11.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Button ID = "dropdown" & gt; Toggle & lt; / Button & gt; & Lt; Div id = "dropdown1" & gt; & Lt; / Div & gt;      

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -