Code Monkey home page Code Monkey logo

Comments (12)

lukehaas avatar lukehaas commented on May 23, 2024 1

I've just pushed an update that includes console warnings if IDs are used that match the hash values.

from scrollify.

lukehaas avatar lukehaas commented on May 23, 2024

Hi,
Could you let me know the following things:

Have you established that JavaScript is able to run on your page?
Which version of jQuery are you using?
Are you using an easing library?
Which browser are you using?

from scrollify.

juggerpy avatar juggerpy commented on May 23, 2024

Thanks for the reply. I've done some more testing and i've found that the
problem is a conflict between the "id" and "data-section-name". I was the
same name for both, therefore, i was not animating when jumping between
sections.

Hope it helps.

2015-02-01 15:24 GMT-03:00 Luke Haas [email protected]:

Hi,
Could you let me know the following things:

Have you established that JavaScript is able to run on your page?
Which version of jQuery are you using?
Are you using an easing library?
Which browser are you using?


Reply to this email directly or view it on GitHub
#9 (comment).

from scrollify.

indrekpaas avatar indrekpaas commented on May 23, 2024

@lukehaas Is there a reason why "id" and "data-section-name" can't contain the same value?

from scrollify.

juggerpy avatar juggerpy commented on May 23, 2024

I didnt know it was intended. However, I didn't see it mentioned anywhere.
Hope the feedback helps.

2015-02-09 3:39 GMT-03:00 indrekpaas [email protected]:

@lukehaas https://github.com/lukehaas Is there a reason why "id" and
"data-section-name" can't contain the same value?


Reply to this email directly or view it on GitHub
#9 (comment).

from scrollify.

lukehaas avatar lukehaas commented on May 23, 2024

This is due to native browser functionality. When a hash value in the URL matches an ID on a page, the browser will jump to the location of that ID on the page. This is the reason 'data-section-name' has to be given a different value to the ID.

from scrollify.

juggerpy avatar juggerpy commented on May 23, 2024

Excellent. Thanks for the reply.

2015-02-09 16:29 GMT-03:00 Luke Haas [email protected]:

This is due to native browser functionality. When a hash value in the URL
matches an ID on a page, the browser will jump to the location of that ID
on the page. This is the reason 'data-section-name' has to be given a
different value to the ID.


Reply to this email directly or view it on GitHub
#9 (comment).

from scrollify.

indrekpaas avatar indrekpaas commented on May 23, 2024

@lukehaas wouldn't it make more sense to use IDs instead for increased accessibility and flexibility? Animating scroll to an element with an ID is progressively enhancing the default behaviour.

from scrollify.

juggerpy avatar juggerpy commented on May 23, 2024

Let me illustrate. This is an example of the markup i was using:

So, whenever i was using this function:

$.scrollify("move","#home");

It was making a jump to the section, but without animating anything.

I had to change the markup to this:

For the animation jump to work.

Hope it helps.

2015-02-09 18:47 GMT-03:00 indrekpaas [email protected]:

@lukehaas https://github.com/lukehaas wouldn't it make more sense to
use IDs instead for increased accessibility and flexibility? Animating
scroll to an element with an ID is progressively enhancing the default
behaviour.


Reply to this email directly or view it on GitHub
#9 (comment).

from scrollify.

lukehaas avatar lukehaas commented on May 23, 2024

@indrekpaas that would certainly be ideal. However, I don't think there's a good way to overcome the browsers native behaviour of jumping to the locations of IDs that match hash values.

from scrollify.

juggerpy avatar juggerpy commented on May 23, 2024

I understand. It's ok. Thanks for the reply.

2015-02-10 16:30 GMT-03:00 Luke Haas [email protected]:

@juggerpy https://github.com/juggerpy that would certainly be ideal.
However, I don't think there's a good way to overcome the browsers native
behaviour of jumping to the locations of IDs that match hash values.


Reply to this email directly or view it on GitHub
#9 (comment).

from scrollify.

HugoHeneault avatar HugoHeneault commented on May 23, 2024

It would be great if Scrollify could detectd & say something about this in the console. 😋

from scrollify.

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.