0

I've got a function:

            (function(jQuery) {
jQuery.fn.przelicz = function() {
return this.each(function() {


     var wysokosc = jQuery(window).height() * 0.554;
     jQuery(this).find("img").height(wysokosc);
            jQuery(this).height(wysokosc);
});

};
})(jQuery);

I wish that this function will be run with 300ms delay. How to do this?

2 Answers 2

1

An alternative using jquery api can be found here http://api.jquery.com/delay/

Sign up to request clarification or add additional context in comments.

Comments

1

You can use the standard JavaScript setTimeout() function to run a function after a delay.

setTimeout(jQuery.fn.przelicz, 300);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.