Giter Site home page Giter Site logo

Comments (6)

michaeldhopkins avatar michaeldhopkins commented on July 16, 2024

It seems to be because when vartop is set, $(this) refers to document and the purpose of .offset() is to determine position relative to document, so it's always undefined. Is that accurate? It seems like vartop could be replaced with 0 with no consequence to the plugin if so.

from stickup.

Marrieukr avatar Marrieukr commented on July 16, 2024

Same problem. Can yaou help me to replace vartop with 0 ?

from stickup.

auralon avatar auralon commented on July 16, 2024

Just come across this working on a site for a client and I'm wondering why this hasn't been dealt with and closed off yet. As @michaeldhopkins stated, replacing vartop with 0 has no ill effects.

Is this project no longer maintained?

from stickup.

kunapyanov avatar kunapyanov commented on July 16, 2024

Just append var vartop = 0; right after var topMargin = 0;
Here is peace of code where I append:
$(document).ready(function(){
var contentButton = [];
var contentTop = [];
var content = [];
var lastScrollTop = 0;
var scrollDir = '';
var itemClass = '';
var itemHover = '';
var menuSize = null;
var stickyHeight = 0;
var stickyMarginB = 0;
var currentMarginT = 0;
var topMargin = 0;
var vartop = 0; //Append default value here!
$(window).scroll(function(event){

from stickup.

auralon avatar auralon commented on July 16, 2024

@almask, yeah that's exactly what I did also. However, it would seem that vartop is in fact superfluous to requirements and all logic relating to it could probably be removed entirely also.

Anyhow, it would be nice to see, at the very least, that change/patch be implemented so that people using the library don't see the error in their console!

from stickup.

eldadna avatar eldadna commented on July 16, 2024

Add
var vartop = 0;

from stickup.

Related Issues (20)

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.