Forum Moderators: open
This doesn't serve as a solution.
Let me try to explain it better.
I set up a page with two columns. On the right there are thumbnails for products, and on the left there is a main detail shot of the product. When the right thumbnail is clicked the main detail DIV is swapped out to display a new DIV (a new detail shot).
What I am trying to do, is link directly to the second, or third DIV. So say I'm on a random page, and I want to link directly to the third detail shot of an item how do I link to that.
Right now it just links directly to the default DIV on the page.
http://www.example.com/product_1.html#photo_2
...and when the user clicks that link, it automatically loads up the second photo?
You can do this by setting up your product page to look for an initial hash tag value. Here's some basic code to get you started.
window.onload=function() {
if(location.hash.replace(/#/,'') != undefined && location.hash.replace(/#/,'') != ''){
your_function_to_swap_divs( location.hash.replace(/#/,'') );
}
}
You'll want to make sure in your function that it checks to make sure the anchor is a valid image on the page.