Reputation: 41
I found an interesting script (link) but it runs only once after the document was loaded, how do I run the script every time I see it? Thanks guys.
jQuery(document).ready(function($){
setTimeout(function(){
$('.trans--grow').addClass('grow');
}, 275);
});
Upvotes: 0
Views: 294
Reputation: 16384
You can wrap this code into another function like this:
function yourFunction (delayMs) {
setTimeout(function() {
$('.trans--grow').addClass('grow')
}, delayMs)
}
And invoke this function whenever you want via yourFunction(275)
.
Upvotes: 1