![]() ![]() |
| 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! |
| Frederiek |
Jun 27 2012, 07:56 AM
Post
#2
|
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,586 Joined: 23-August 06 From: Europe Member No.: 9 |
You need to change the CSS and jQuery has a hook for that. Have a look here: http://www.jquery4u.com/dynamic-css-2/change-css-jquery/
-------------------- "The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French) "Leave scepticism to others and take action" from HOME by Goodplanet An inconvenient truth by Al Gore |
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th June 2013 - 12:57 AM |