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

How to delete cookies in jquery?

0 Answers  


How to keep the submit text from showing with jquery mobile? : jquery mobile

0 Answers  


How to load jQuery locally when CDN fails?

1 Answers  


How can you select all elements in a page using jquery?

0 Answers  


Jquery can be used in what scenarios?

0 Answers  


what is the use of param() method in jquery .

0 Answers  


How to create clone of any object using jQuery?

1 Answers  


Explain url paremeter of jquery ajax method?

0 Answers  


Can you write a code to select all links inside the paragraph?

0 Answers  


Tell me do I need to add the jquery file both at the master page and content page as well?

0 Answers  


What is jquery.holdready() function?

0 Answers  


What is the difference between .js and .min.js?

1 Answers  


Categories