Misfiring jQuery media query -
I'm having trouble getting this bit of script as soon as the window is ready, I need to run it, But at the moment when I slightly reduce the size of the browser window, only the fire goes: S
$ (window). Resize (function () (If ($ (this). Width ()> gt; = 1280) {$ (function () {$ ('.img-wrap, .qoute-background') .css ({'min- Height ': (($ (window). height ())) +' px '}); $ (window). Reset (function () {$ ('. Img-wrap, .qoute-background '). Css ( {'Min-height': (($). Height ()) + 'Px'});})}});}});
Trigger just once.
$ (function () {$ (window). Reset (function () (if ($ (this) .wide ()> = 1280) {$ ('.img-wrap, .qoute-background '). css ({' Min-height ': (($ (window). light ())) +' px '});}}). trigger (' resize ')});
And it is a bit clearer to see your DOM ready as above ..
Comments
Post a Comment