Advanced Search

Results 1 to 3 of 3

Thread: Accordion Script - turning off animation?

  1. #1
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion Script - turning off animation?

    1) Script Title: Accordion Content script (v1.3)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm

    3) Describe problem:
    Basically the Accordion is animated when clicking to reveal the lists. Right
    now I just see the possibility to change the animation speed. Is there also
    an option to turn off animation slide at all? I'd rather have just a show and
    hide func without any sliding.

    Thanks

    T.C.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,864
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    The easiest way is just to set the animation duration to a very small number, like 1 milliseconds:

    Code:
    	animatespeed: 1, //speed of animation: "fast", "normal", or "slow"
    Technically there is still an animation, just so fast it should suffice in fooling people. You can physically edit the .js file to make it truly just show/hide the contents, though it's much less elegant. Let me know if you want to go that route instead.

  3. #3
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    For the moment I'm fine, thx.

    There is just another issue about highlighting the current active menu point.
    Basically I get an highlight status for my main menu points. What kind of solution
    could be integrated to have the same function for the sub menus point? If someone
    is clicking the menu point a new page has been loaded. At the same time this a-tag
    should also get an new class for active status.

    Right now I was writing a toggle func for this task:
    Code:
    // toggle func for js cat menu	   
    	$(".cat ul.level2 a").toggle(
          function () {
            $(this).css({fontWeight: "bold"}).css({color: "#c64d4d"}).css({backgroundImage: "url(images/icons/nav_item_active.gif)"})
          },
          function () {
            $(this).css({fontWeight: "normal"}).css({color: "#556469"}).css({backgroundImage: "url(images/icons/nav_item_inactive.gif)"});
          }
        );
    But how can I write the status as cookie? It should last as long as no other menu
    point under ".cat ul.level2 a" has been clicked?

Bookmarks

Posting Permissions

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