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 3 of 3

Thread: Need help

  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help

    Can any one tell me whats wrong with this ::
    the accordion works if i replace "$(this).next().animate({'height':'toggle'},'2000','easeInElastic'); " with "$(this).next().show(2000);".. Why??


    <html>
    <head>
    <title> Inserting into dom</title>
    <script type="text/javascript" src="../jquery.js">
    </script>
    <script type="text/javascript">
    $("document").ready(function (){
    $("#accord > div").hide();
    $("#accord h4").click(function ()
    {
    $(this).siblings('div:visible').slideUp('2000');
    $(this).next().animate({'height':'toggle'},'2000','easeInElastic');

    });
    });


    </script>
    <style>
    h4 {
    background-colorarkSlateGray;
    color:white;
    padding:10px;
    }
    div
    {
    background-color:lightCyan;
    width:200px;
    overflow:hidden;
    }
    </style>
    </head>
    <body>
    <div id="accord">
    <h4>one</h4>
    <div>sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometex tsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext</div>
    <h4>two</h4>
    <div>sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometex tsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext</div>
    <h4>three</h4>
    <div>sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometex tsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext</div>
    <h4>four</h4>
    <div>sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometex tsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext
    sometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsometextsome textsometextsometextsometext</div>
    </div>
    </body>
    </html>

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    Are you including jQuery easing (http://gsgd.co.uk/sandbox/jquery/easing/)? You need this as well as the base jQuery to use easing.

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh yes... Sad mistake...Thank You SB65!!


  •  

    Posting Permissions

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