jquery trigger click problem
I had a problem getting jQuery to work at all on the page. I found some code which helped me get it to work (see function below).
I tried to add the line
- $('#firstpic').trigger('click');
Although it doesn't break, it doesn't work either. What I want to happen is that the id firstpic would be clicked when the document is ready. This will bring up a pretyPhoto slide show.
- <script type="text/javascript" charset="utf-8">
( function($) {
$(document).ready(function(){
$("area[rel^='slideShow']").prettyPhoto();
$(".gallery:first a[rel^='slideShow']").prettyPhoto({animation_speed:'normal',theme:'light_square',slideshow:3000, autoplay_slideshow: false});
$('#firstpic').trigger('click');
$(".gallery:gt(0) a[rel^='slideShow']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
});
} ) ( jQuery );
Any help much appreciated. I am new to jQuery.
MrsBurnside