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.
$(document).ready(function() {
$("#btnDummy").one("click", function() {
alert("This will be displayed only once."); }); });