| | #1 |
| Active Warrior War Room Member Join Date: 2011
Posts: 34
Thanks: 31
Thanked 32 Times in 31 Posts
|
|
| Last edited on 24th Mar 2016 at 06:46 AM. Reason: | |
| |
| | #2 |
| Warrior Member War Room Member Join Date: 2011 Location: Ipswich, England
Posts: 29
Thanks: 0
Thanked 3 Times in 3 Posts
|
First I would recommend coding up the HTML of what you require with proper Classes and IDs so you can target the elements with Javascript. Basically for your first case you would set the hidden div to display:none; Lets say your hidden div has a class of .hidden and your button has a class of .button. Your code will be something like this:- Code: $(function(){
$('.hidden').css({opacity:0}); //Use jQuery to set the opacity to 0
$('.button').click(function(){
$('.hidden').css({display : "block"}).stop(0,0).animate({opacity:1},500);
});
}); .
|
| | |
| |
| | #3 |
| Warrior Member War Room Member Join Date: 2011 Location: Ipswich, England
Posts: 29
Thanks: 0
Thanked 3 Times in 3 Posts
|
Dude that's a comment in my code explaining what I am doing with that line. The code is complete I'm not telling you to do anything extra. Perhaps you can link me to the live site and I will put your elements into the code above .
|
| | |
| |
| | #4 |
| Warrior Member War Room Member Join Date: 2011 Location: Ipswich, England
Posts: 29
Thanks: 0
Thanked 3 Times in 3 Posts
|
Yeah you will need to include the jQuery library.
|
| | |
| |
|
| Bookmarks |
| Tags |
| javascript or jquery |
| |