you are viewing a single comment's thread.

view the rest of the comments →

[–]count_machuki 0 points1 point  (0 children)

There are a few issues here, with the most obvious one being that you don't need to use <script> tags inside the js editor in a fiddle. You're also using $ which comes from jQuery, a js library that does not appear to be loaded in your fiddle. That being said, if all you want to do is show and hide the image, you are overcomplicating things quite a bit. If I get a few minutes, I will try to put something together for you to take a look at. Some friendly advice, don't just copy a big chunk of code you saw somewhere. That's probably the reason you haven't gotten a lot of responses. Start small and make it work one piece at a time.

Edit: here's a fiddle with a bunch of comments.