Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-25-2012, 11:33 PM   PM User | #1
Cpt.NoobCode
New to the CF scene

 
Join Date: Jul 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Cpt.NoobCode is an unknown quantity at this point
How to make this jquery and add animation

Is there a way to animate this function? so when it "expands" switches between the css it does this slowly/medium/fast. (So how do i remake this to jquery and add animation?)

Code:
    function changeCssClass(objDivID)
    {
        if(document.getElementById(objDivID).className=='normalSize')
        {
            document.getElementById(objDivID).className = 'expandedSize';
        }
        else
        {
            document.getElementById(objDivID).className = 'normalSize';
        }
    }
css code:

Code:
.normalSize { width:640px; height:360px; }

.expandedSize { width:1000px; height:480px; }
Cpt.NoobCode is offline   Reply With Quote
Old 07-26-2012, 11:59 AM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Try this:

http://docs.jquery.com/Tutorials:How_jQuery_Works
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Reply

Bookmarks

Tags
jquery

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:11 PM.


Advertisement
Log in to turn off these ads.