On click a image how can another page be previewed in the same page without opening the actual page. Lets say the url /home/home.php?id=3
The preview should be in the preview div:
<img src="/home/app/img/toggle.gif" onlclick="show();" />
<div id="preview"></div>
You can use
.load()for this. Here’s an example, HTML like this:jQuery like this:
Or, if you had lots of previews, something like this more generic works:
With this jQuery: