Have you tried $(document).ready(function(){
   // put the code to display your image here
});

Someone correct me if I'm wrong, but .click() is specifically tied to the user clicking the mouse button.

I think the document ready code above is the sort of thing you're looking for.

Hope this helps!

Cheers,
Chris

Sean O wrote:
Hi,


I'm trying to simulate a click of a link on my page. (to open a jpg in
greybox on page load)
How do I do it?

I tried click(), but it doesn't seem to do anything.

        $(function() {
                $("#imglink").css("background","yellow").click();
        });

        <a rel="gb_image[]" href="myimg.jpg" id="imglink">My 
Image</a>

The background changes (for testing), but the click event is not triggered.
Tips?


Thanks,

________
SEAN O

--
http://www.cjordan.info

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to