Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Fancy Gallery manual call WordPress

  • SOLVED

I have the fancy gallery plugin and want to manual call the gallery additionally from a text link.
The gallery is normally added into the post. I try .triggerhandler but i'm not shure what event is to trigger to start the gallery. Any help is apperciated.


<a id="manual">watch</a>

<script>
jQuery("#manual").click(function() {
jQuery("fancy-gallery gallery").triggerHandler("click");
});
</script>

Answers (2)

2011-06-22

Svilen Popov answers:

Try this:

<script>
jQuery("#manual").click(function() {
jQuery(".fancy-gallery img:first").trigger("click");
});
</script>


Peter Brain comments:

Works like a charm, you make my day...thx a lot !

2011-06-22

Julian Lannigan answers:

Do you have an example that I can view?


Peter Brain comments:

I have it only local. The html for the gallery is:

<div class="fancy-gallery gallery" id="gallery_110"><a href="http://img.localhost/img1.jpg><img src="http://img.localhost/img1-124x124.jpg" width="124" height="124" class="attachment-thumbnail" /></a></div>

I think the WP gallery function is very similar you can try it without the Fancy gallery plug-in.

All I want is to start the Gallery from a text link.