Szychowski: Because you don’t use that.
Szychowski: Even better – why is your code in an iframe?
Goldberger: Wp customizr has its own method to attach change events on the setting
Rountree: Hey I have an issue with my page in mobile mode. the footer navigation sections are slide/toggle but when i slide one down the scrolling of the page is completely ****ed up and im not sure what’s causing it. mind taking a look? http://demo.web.solstice.demandware.net/on/demandware.store/Sites-RockportUS-Site
Szychowski: It’s the weird fixed positioning you’re hitting on that free shipping banner
Szychowski: Oh, no, on the search bar.
Szychowski: Your calculation is off for when that should fire.
Eisenmenger: Hello, I’d like to select all elements with a cl***, which also do not have a cl*** which ends with mobile, I tried “.my-cl***:notcl***$=’mobile'” but to no avail
Eisenmenger: Can I do it in a single selector or do I need to filter after getting all instances of .my-cl***?
Szychowski: So for starters, https://api.jquery.com/not-selector/
Szychowski: But i’d use .filter with a function. or change the way you’re generating your markup to get better cl***es on there.
Eisenmenger: Yea maybe I’ll just do it with the cl***es. hmm
Eisenmenger: Woops sorry. It’s not the most versatile I guess to do it with cl***es because if someone changes the viewport it might hit the wrong elements. hmm. Alrighty, thanks robertmaxrees
Szychowski: You want to use cl***es, just not the way you are right now :
Eisenmenger: Yea Szychowski but I’m trying to prevent a resizing of the viewport from leaving multiple sets of the same element visible.
Eisenmenger: But yea that makes sense
Szychowski: Sounds like you need to look at using responsive CSS techniques.
Eisenmenger: I’m not going to refactor the whole code base to use flex for instance ;_
Szychowski: Sure, but this particular problem could be pretty quickly solved without making the problem worse.
Eisenmenger: I have divs for mobile and divs for desktop I need to distinguish between them
Goldberger: Media queries have been standard for years
Eisenmenger: Sure. I understand that
Eisenmenger: I need to hide based on the page offset
Szychowski: What does offset have to do with desktop vs mobile?
Eisenmenger: Nothing. the webpage itself has different element divs for mobile and desktop
Szychowski: So we’re talking about fixing your responsive problems.
Eisenmenger: Lol, you might be. I’m just going to fix this problem for now
Szychowski: Right, so fix it with css.
Szychowski: No refactors required.
Eisenmenger: What do you mean? fix what with css?
Szychowski: You said you’re trying to hide/show things based on window size using js. you can do that with css pretty trivially.
Eisenmenger: No, I’m trying to hide and show divs that are hidden and shown based on window size by page offset on scroll event
Eisenmenger: I certainly know about media queries for page size this would be the wrong channel for that question anyways ;-
Szychowski: So you want to control that visibility using both offset and window size?
Goldberger: Window.scrollX,window.scrollY, window.innerWidth, window.innerHeight give you a viewport rectangle that you can run against your elements
Szychowski: I’m trying to p**** that sentence.
Misner: Eisenmenger: showing based on window size is doable with media query, but you can’t detect scroll or offset in css
Eisenmenger: So yea the do***ent looks like div.mobile.hide-on-scroll/div div.hide-on-scroll/div And I want to show the proper elements when you scroll to a certain point, on hide I just hide them all