Hi,
I'm looking for help customizing some JavaScript. I'm primarily a web designer and I recently added some JavaScript to my portfolio website.
http://www.revelae.com/spotlight.html
When you click on the "more" boxes, the page loads in additional content.
Everything works great, but I want the content to "load" while bringing the screenview back up to the top of the page after each click.
I think this is a pretty quick fix, I just need to add something extra to my current JavaScript code. Any help on what to add is greatly appreciated!
Here's the code:
<script type="text/javascript">
ajax.pages = new Array();
ajax.pages["spotlight-main"] = "spotlight-main.html";
ajax.pages["spotlight-royal-rompers"] = "spotlight-royal-rompers.html";
ajax.pages["spotlight-trievas-spa"] = "spotlight-trievas-spa.html";
ajax.checkHash = function()
{
var windowHash = window.location.hash.replace("#", "");
windowHash = (windowHash == "") ? "spotlight-main" : windowHash;
if(windowHash != ajax.currentHash)
{
ajax.setHash(windowHash);
}
}
</script>
-Katie