Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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; }

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    "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


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •