Wednesday 15 May 2013

jquery - How do I have a different image load on each page refresh? -


I am trying to load a different image with each page refresh. I have tried this code:

    

But I'm a jQuery and JavaScript Newbill, and it's not working for me. I'm definitely doing something wrong, but I do not know where to start with jQuery. I'm pretty sure this is a syntax error. Can someone help me?

Thank you!

Something is back and forth, but here's the code, should not cause any problems:


Your code works

If you still have problems, try loading jQuery. The browser may complain that the anonymous function is created outside the first match of the bracket:

incorrect:

 }) (jQuery);   

Correct:

 } (jQuery));    

No comments:

Post a Comment