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

Why jQuery is better than JavaScript?

0 Answers  


How to get the value of selected option in jquery?

0 Answers  


How to Use the jQuery load() Method?

0 Answers  


What are the selectors in jquery? How many types of selectors in jquery?

0 Answers  


Jquery can be used in what scenarios?

0 Answers  


How to resolve conflicts with other libraries?

0 Answers  


Is numeric in jquery?

0 Answers  


Hide and show image on button click using jQuery?

0 Answers  


What is jquery toggle function?

0 Answers  


Can we include multiple version of jquery? : jquery mobile

0 Answers  


Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?

0 Answers  


What is the difference between the id selector and class selector in jquery?

0 Answers  


Categories