OnClick Background Image |
OnClick Background Image |
Kiana Marie |
Jun 26 2012, 04:00 PM
Post
#1
|
Group: Members Posts: 1 Joined: 26-June 12 Member No.: 17,338 |
I've had a lot of trouble with this all day, because I am so new to HTML in general that there's a lot of basics that I don't know.
I went on another site and asked for this kind of coding, and I was given this, "if you want to use jquery is: (first you have to put id into your link as id="link") <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#link').click(function(){ $('#id_background').attr('src','23lz49h.jpg'); }); }); </script>" the conversation is all on here. http://stackoverflow.com/questions/1121432...d-image-onclick And I'm just generally confused. All I want to do is edit this page, (www.eiramanaik.tumblr.com) so that there is a button at the top, and when you click it, the current background image, (http://i46.tinypic.com/eukfg7.jpg) is changed to, (http://i50.tinypic.com/23lz49h.jpg) Please help! |
Lo-Fi Version | Time is now: 27th April 2024 - 09:11 PM |