• I love the idea, and the way it works.
    But SURELY, the ‘Do not stick element when screen smaller than:’ should work on the vertical axis?! I set this to 1200, meaning for me the height of the screen, but with a screen of 1280×800 it stickies, which makes it unusable because the nice side menu it is taller than 800. Am I missing something?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, thanks for trying my plugin ??

    When you set this setting to 1200, it means that your element will not be sticky on screens that are 1199 pixels wide (or less).

    The plugin currently does not have an option to detect the screen height, but I will keep it in mind for a future release.

    Thread Starter triplemaya

    (@triplemaya)

    Hi Mark
    Thanks for the prompt reply on a holiday.
    Still not sure if I am missing something. I understand the setting works on width not height. I do not understand why. Surely, given the objective of the plugin, height matters while width is totally irrelevant. Isn’t it? Why would the width matter?

    Although in your case, I can see why the height matters (since it’s related to the height of the element), in general, the screen width is being used to determine/detect (or at least get an idea) of the type of device.

    For example, a screen width of 480 or less usually means that we’re dealing with a phone, and a screen width of 768 usually means we’re dealing with a tablet. Or, in other words, those screen widths simply indicate that it’s a small screen altogether.

    What’s also important is that most themes responsiveness is based on the screen width (for example, a regular menu on screens larger than 1024 wide, and a hamburger menu for screens smaller than 1024). Because of that, the plugin will also follow that indicator – that way, the menu can be sticky when it’s regular, and not sticky when it’s a hamburger.

    Hope that explains it a bit!

    Thread Starter triplemaya

    (@triplemaya)

    Thanks again Mark.

    The principle is clear, what I don’t understand is why this plugin would use width not height in the first place. Are there ready handles in WordPress for width but not for height?

    Anyway, is it possible to change the code? I had a look through but could not track down where it was getting the width value. (I was a C / UNIX / X Window prog but that was a very long time ago.)

    what I don’t understand is why this plugin would use width not height in the first place.

    That’s because most themes switch (between a desktop view and mobile view) based on screen width as well.

    For example, a theme can have a regular menu on screens larger than 768px, and that turns into a mobile menu on screens smaller than 768px. If the regular menu needs to be sticky, but the mobile menu doesn’t, then the most efficient way is to change stickiness based on the screen width too.

    It’s possible to change this in the code, but I’m not able to do that for you. You’re the first who ever requested this (so I don’t believe there’s much demand for it), and it would require some customization. I don’t have time to do this for you on the short term, but I can direct you and tell you where in the Javascript you’d need to change it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Do not stick element when screen smaller than:’ is closed to new replies.