0

is there a way to add some code to a link, so that it will automaticaly "load" some content into a "div".

For example: www.mysite123abcxyz.com - will show the page with project preview images. www.mysite123abcxyz.com/open - will show the page with the details of an project expanded.

The code for "opening" the details, which works so far:

<a  onclick="$('#openthis').slideDown(); $('#opentheother').slideUp(); $('html, body').animate({scrollTop: $('#detail').offset().top }, 800);"><img src="open.jpg"></img></a>
  • 1
    You can look at the value of `window.location.pathname` when the page loads. – Paul D. Dec 28 '13 at 20:28
  • check [this](http://stackoverflow.com/questions/6953944/how-to-add-parameters-to-a-url-that-already-contains-other-parameters-and-maybe), it might help you. Try looking for similar questions to yours before asking next time. – Basil Basaif Dec 28 '13 at 20:36
  • server won't find that path and will throw a 404 error, should probably use url hash , then parse hash from `location.hash` on page load – charlietfl Dec 28 '13 at 20:40

0 Answers0