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

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -