Giter Club home page Giter Club logo

stickymojo's Introduction

stickyMojo

stickyMojo is a contained sticky sidebar plugin for jQuery. It's lightweight, fast, flexible and compatible with Firefox, Chrome, Safari, and IE8+. It will degrade gracefully in older versions of IE. Here are the instructions.

Credits

MojoTech

License

stickyMojo is Copyright © 2014 MojoTech, LLC. It is free software, and may be redistributed under the terms specified in the LICENSE file.

stickymojo's People

Contributors

aesnyder avatar antialias avatar cpjolicoeur avatar damiandennis avatar kishfy avatar nareike avatar samccone avatar skotz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stickymojo's Issues

Code error, line 18?

$(settings.contentID).offset.left is missing its parens on offset (eg. $(settings.contentID).offset().left)

Remove UserAgent Sniffing

The userAgent sniffing utilised in this API will cause false positives for Opera 6-8, as those builds ape Internet Explorer builds.

UserAgent sniffing is a thoroughly disproved anti-pattern; please stop using it.

Details of this practice can be found via the following link:

http://www.fortybelow.ca/hosted/comp-lang-javascript/faq/notes/detect-browser/

which is an excellent article written by Richard Cornford, and has stood the test of time.

Furthermore, the assertion of Graceful Degradation for IE < 8 is simply false. Shutting out browsers based upon a very shallow criterion is anything but graceful.

Adding extra Margin to sticky sidebar?

Hi, great Plugin, but just have one problem, when the sticky sidebar starts scrolling its margin-left property changes to the width of the main content on the left side. (My sidebar is on the right). But originally my sticky sidebar had a 20 pixel left margin and that goes away messing up the design, is there a way i can just add those extra 20px to the sidebar margin. Maybe this would make for a good new and easy feature to implement?

script fails when offsetTop : 0

In the checkSettings() method settings[key] evaluates as false when offsetTop is 0.

the whole block of code

  for (var key in settings) {
       console.log(settings[key]);
       if (!settings[key]) {
           errors.push(settings[key]);
       }
  }

seems unnecessary since the only reason a setting would be false is on purpose since the all have defaults.

Feature Request: Top viewport offset for when margin-top = 0

Using margin-top seems like it isn't the ideal way to specify where position: fixed starts getting applied, since this requires styling your layout with the sidebar initially pushed down the page if you want it to be spaced from the viewport edge when scrolling. I feel that forcing margin-top is quite restrictive and isn't very flexible (eg: My sidebar is under a header which provides the top spacing, but the sidebar itself NEEDS margin-top: 0; to line up with it's associated main content).

A possible solution would be to use the "top" value instead of "margin-top" since this usually wouldn't affect the initial element positioning when position: static is applied (afaik).

Alternatively it could be nice to have an optional parameter for "additional top viewport offset" when the function is called, which would keep the sidebar this far from the viewport edge even if the top margin is initially set to 0.

I imagine the same could be true for the bottom values, however isn't immediately apparent since it usually won't affect the initial styling.

Fails when sticky box changes height

My project requirements stipulate that certain user actions on the page will append or remove certain content to/from the floating box, changing its height dynamically. It appears that stickyMojo's upper and lower scrolling bounds are thrown off when this occurs, leading me to believe that some recalculation of positioning is required when the box content changes. I see no relevant function to do this, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.