Repeat a function on window resize in jQuery?

Define your function in a way that it's callable from wherever you need it. Like so.

Define your function in a way that it's callable from wherever you need it. Like so: var imgControl = function() { $('div. Lb_img img').

Each(function () { ... // etc }); }; $(document). Ready(function () { imgControl(); }); $(window). Resize(function() { imgControl(); }).

Hahah beat me to it! – CtrlDot Mar 16 at 4:44 I know, it's like a race sometimes. :) – bigmattyh Mar 16 at 4:45 Thanks bigmattyh!

And also, thanks CtrlDot, for making the effort. That worked perfectly, and now I know something that I really ought to have known already. – Craig Mar 16 at 4:49.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions