I have a div that drops down and appears using jQuery when a user clicks on a specific link. Would it be possible to activate this script on page load if the URL ends in a certain hashtag?
To be more specific. My site has a panel on every page that contains a form users fill out to request a quote on our products. If a user visits a product page where the URL is http://mysite.com/product/ipod#quote, I’d like for my javascript activated panel to activate on page load.
And to be clear, the hashtag will not be a location on my page.
hashis the name of the hasha#with-idis the selector of the linkif the “hash” is the only value in your hash, you can simply compare with
document.location.hash === '#hash'