I am using a plugin called “sticky” that makes a portion of my site act like it’s position:fixed.
I am now onto the media query portion, I am making the site scale down for mobile, but I need the sticky plugin to stop working past say 880px. Not sure how to go about doing this.
I use that code in the footer to activate it. Is there a way to have a stop function at a width?
On another thought, since im running it through a WP function file, anyway to dequeue it at a width and requeue if resized again?
You would say “if the window width is greater or equal to 880px, run the sticky()”
Thanks! Works well, however you have to reload if the browser is manually re sized. I’ll use this, but is there some way around that?
Try this (I haven’t tested)
Thanks but no go on that.
Edit: Actually, it works from going from the smaller size to larger. But not the reverse.
Yeah that’s how it should work. The only way to “Reverse” what `.stick()` has done is to actually know what it’s doing and manually reverse it. Unless they’ve created an `.unsticky()` method but I’m sure they haven’t.
I’ve got some code i’d like some help with but I can’t even get it to display in a black ‘code box’ on my post!
What tags should I wrap my jquery in so it displays in a readable manner for forum members?
You must be logged in to reply to this topic.