Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash is undefined when using hashDataAttribute: true #255

Open
prashantsani opened this issue Feb 2, 2015 · 5 comments
Open

hash is undefined when using hashDataAttribute: true #255

prashantsani opened this issue Feb 2, 2015 · 5 comments

Comments

@prashantsani
Copy link

Hello.
I m using following options for the slider;
var options = {
navigationSkip: false,
hashTags:true,
hashDataAttribute:true,
hashChangesOnFirstFrame:true

};

i have used all the three options hashTags, hashDataAttribute and hashChangesOnFirstFrame as true. I have included the hashChange event plugin (http://benalman.com/projects/jquery-hashchange-plugin/ ) Also i have added a data-sequence-hashtag attribute as follows:

<li class="animate-in" data-sequence-hashtag="hash1">
........
</li>

but the hash in url is always undefined.

Example URL :
http://prashantsani.com/demos/misc/sequence/

@IanLunn
Copy link
Owner

IanLunn commented Feb 2, 2015

This error appears in the console:

$.browser is undefined

I believe this is being caused by the jQuery hashchange plugin and your use of jQuery 1.9.1. $.browser was removed from jQuery 1.9+ so you'll either need to look for an updated version of hashchange that works with jQuery 1.9 or downgrade jQuery to anything below 1.9.

@IanLunn IanLunn closed this as completed Feb 2, 2015
@IanLunn IanLunn added the Support label Feb 2, 2015
@prashantsani
Copy link
Author

Thanks for the update.
But when I m using this plugin, https://github.com/gabceb/jquery-browser-plugin
(which kinda solves $.browser issue, still the #hash is undefined.

is there any otherway I can have the #hash thing?
Thanks.

@IanLunn IanLunn added Plugin Bug and removed Support labels Feb 3, 2015
@IanLunn IanLunn changed the title hash comes as undefined when hashChangesOnFirstFrame: true is used. hash is undefined when using hashDataAttribute Feb 3, 2015
@IanLunn IanLunn reopened this Feb 3, 2015
@IanLunn
Copy link
Owner

IanLunn commented Feb 3, 2015

This is a bug with hashDataAttribute, possibly an update to the jQuery library has made the way Sequence gets data attributes obsolete.

Instead of using hashDataAttribute and data attributes, please set hashDataAttribute to false and use IDs to specify a hashtag instead.

I believe the fix for this is changing all instances of:

.prop(self.getHashTagFrom);

To:

.data("sequence-hashtag");

@IanLunn IanLunn added this to the 1.1.0 milestone Feb 3, 2015
@IanLunn IanLunn changed the title hash is undefined when using hashDataAttribute hash is undefined when using hashDataAttribute: true Feb 3, 2015
@prashantsani
Copy link
Author

Hey.
I replaced following
.prop(self.getHashTagFrom);

To:
.data("sequence-hashtag");
(as you said)
It works now. Can we have a another library used instead of hashChange for future update? as hashChange isnt updated and we have to rely on $.browser jQuery plugin.

Bdw, a big fan of sequence.js Have been using and following sequence.js since its inception long time ago. Havent faced any issues yet, amazing library :)

Thanks

@IanLunn
Copy link
Owner

IanLunn commented Feb 3, 2015

Sequence v2 (check out the early build here) works without a dependency for hash functionality, so this is coming.

Glad you like Sequence, I'll be looking for feedback on v2 soon so maybe you're up for it!

@IanLunn IanLunn removed this from the 1.1.0 milestone Aug 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants