[wd_asp elements=’search’ ratio=’100%’ id=1]

Run code only once .one()

9th August 2013

Jquery Misc

jquery icon

to make something run only the once this is it…

$(".button").one("click", function() {
alert("This will be displayed only once.");
});

OR you can use this as it runs only when loaded.

$(window).load(function(){
// ..
myfunc();
// ..
});