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

Can you give me a brief history of your programming days? Where did it all start?

0 Answers  


How do you install/use jquery in a project.

0 Answers  


How to work with jQuery parent(), children() and siblings()?

0 Answers  


Difference between detach and remove? : jQuery Mobile

0 Answers  


What is .empty()? : jquery mobile

0 Answers  


Why there are two different version of jQuery library?

1 Answers  


Can we select a element having a specific class in jquery ?

0 Answers  


Explain why there are two different version of jquery library? : jquery mobile

0 Answers  


What are the slow selectors in jQuery?

1 Answers  


Define the script build up by jquery?

0 Answers  


What is the use of css() method in jquery?

0 Answers  


what are the features of jquery

0 Answers  


Categories