Welcome to WebmasterWorld Guest from 54.205.88.118

Forum Moderators: open

invoking OnHashChange w/specific bookmark

   
8:55 pm on Jan 5, 2012 (gmt 0)

5+ Year Member



Is it possible to invoke OnHashChange when the hash changes to a specific value, as opposed to any changed hash value?

If so, how would I do that? I have a jQuery slideshow script that automatically changes the hash w/each new slide. I want to call certain js functions for specific slides.
9:15 am on Jan 6, 2012 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



You need to check for the 'specific value' in the onHashChange event. Unless jQuery has a shortcut/filter? But ultimately JavaScript will be firing the event for every change.
12:41 pm on Jan 6, 2012 (gmt 0)

5+ Year Member



Thanks penders -- yes, I discovered a way to do exactly that w/in the jQuery script itself; wanted to test it before posting here. It works perfect.
1:36 pm on Jan 6, 2012 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



So, do you have to explicitly check for the specific value in your script, or did you find a jQuery shortcut? (I don't use jQuery that much.)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month