Link to home
Start Free TrialLog in
Avatar of Chris Labbate
Chris LabbateFlag for Canada

asked on

Click a Gallery Link on Page Load

I have a new development up and running and want to click a link in the gallery so that the proper images load when the page is loaded.

http://www.forgeinfinity.com/kreg/portfolio.html

At the Top of the page, under the black bar you will see all the categories, I want to be able to click these on page load... any scripts for this? I have tried everything!!!

I am trying to create a new HTML page for each item in the list and when I do that it shows all items until I click the category name, I want to do this automatically by triggering a click event.
Avatar of Chris Labbate
Chris Labbate
Flag of Canada image

ASKER

Anyone, Anyone Buler ?
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Actually I just want to run "ONE" click event. Which ever category page they selected from the menu. In the case of this example we could use - jigs,html but if I open that page, the gallery list defaults to the 'all' category. So I would like to trigger the click event "Kreg Jigs" I think I can modify the above code to do that correct?

So just so we are clear all I want to know is after page load, How do I click one of the items in the Gallery list at the top, like the "Kreg Jigs" link.
Tried this code in the head tag and it does trigger a click event, however the gallery dose NOT display the right product items? Any Thoughts ?


<script>
$(document).ready(function() {
	$("ul.portfolio-categ").find("li").each(function() {
		document.getElementById('jigs').click();
	});
});
</script>

Open in new window