Forum Moderators: open

Message Too Old, No Replies

Trigger jQuery function from a specific url

         

rwilson

6:21 pm on Sep 15, 2010 (gmt 0)

10+ Year Member



Is it possible to prompt jquery from a specific url?
I want something like example.com/videos.html#open and have the anchor "#open" to prompt the function. Any help would be greatly appreciated!

Fotiman

6:37 pm on Sep 15, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



On your videos.html page, you would need to do something like:

var h = location.hash;
if (h == '#open') {
// do something
}


Hope that helps.

rwilson

9:02 pm on Sep 15, 2010 (gmt 0)

10+ Year Member



Cool, Thank you! I think this is what I need.