Skip to content

Update jquery.hashchange.js#4

Open
smithxxl wants to merge 1 commit intoapopelo:masterfrom
smithxxl:master
Open

Update jquery.hashchange.js#4
smithxxl wants to merge 1 commit intoapopelo:masterfrom
smithxxl:master

Conversation

@smithxxl
Copy link
Copy Markdown

Allow a change or reset to another previous hash so hashchange can fire or not fire when needed.

I didn't change the dist code, just the source. I'm sure there is a better way, but this was a quick fix for what I needed. I was trying to force a hashchange to run again. So my solution was to clear out the previous hash and then trigger.

$(window).hashchange("prevHash", "");
$(window).trigger("hashchange");

Allow a change or reset to another previous hash so hashchange can fire or not fire when needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant