Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you attach a event to element which should be executed only once?



How do you attach a event to element which should be executed only once?..

Answer / chaitanya

Using jQuery one() method. This attaches a handler to an event for the element. The handler is executed at most once per element. In simple terms, the attached function will be called only once.

Hide Copy Code

$(document).ready(function() {

$("#btnDummy").one("click", function() {

alert("This will be displayed only once.");

});

});​

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More jQuery Interview Questions

Mention the advantages of cdn? : jQuery Mobile

0 Answers  


How to set jquery mobile responsive table width to 100% width despite css styles? : jquery mobile

0 Answers  


Mention some advantages of jquery.

0 Answers  


You get "jquery is not defined" or "$ is not defined" error. What could be the reason?

1 Answers  


What are the advantages of minified version of jquery?

0 Answers  


Explain some benefits of jquery knockout?

0 Answers  


Explain the difference between jquery.size() and jquery.length?

0 Answers  


Define the use jquery.data method?

0 Answers  


How can we include jQuery library in ASP.Net project?

0 Answers  


What is the use of delay() method in JQuery?

0 Answers  


What is meant by a deep copy? : jQuery Mobile

0 Answers  


Does jQuery 2.0 supports IE?

3 Answers  


Categories