This is pretty much what I want to do….
So, the user is browsing my site and they click on a “View by categories” link, this link opens a pop-up window with a series of pictures, that link to different parts of my site. When the user clicks one of those, I want to be able to close the pop-up window and open the link in the original window.
Can anyone help?
I wouldn’t recommend using pop-up for navigation because of pop-up blockers. Use some in-document solutions:
You can use Fancybox jQuery plugin for this: http://fancybox.net/
It has cool functionality to insert a bunch of HTML into its popup-style window.
After clicking a link in your fancybox window the document will reload.
EDIT:
and JS code:
You need to include jQUery and jquery.fancybox JS scripts of course.
and additional CSS code:
EDIT 2
My mistake was that fancybox content can’t be hidden by default but only in a container. After these changes fancybox will work.
EDIT 3
Try to change JS code to this one:
The script will execute after loading images.