Results 1 to 4 of 4

Thread: Contractible Headers Menu, Plus and Minus Signs

  1. #1
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Contractible Headers Menu, Plus and Minus Signs

    1) Script Title: Contractible Headers

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate2.htm

    3) Describe problem: I'm wondering if it's possible to have the plus signs turn to minus signs once they are clicked on and expanded.

    I have my content and titles (two images for titles - one with plus and one with minus) as two different div classes.

    Title CSS:
    Code:
    .rb_title {
    	 	background-image: url(../images/rb_title-plus.png); (or rb_title-minus.png for a minus sign)
    	 	width: 190px;
    	 	height: 23px;
    	 	padding: 7px 0px 0px 10px;
    	 	margin-top:7px;
    	 	margin-bottom:3px;
    	 	font: 14px Arial, Sans-Serif;
    	 	font-weight: bolder;
    	 	color: #FFFFFF;
    	 	cursor:pointer;
    }
    Content CSS:
    Code:
    .rb_content {
    	width: 190px;
    	margin: 0 auto;
    }
    Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Short answer, use Switch Content script instead. "Contractible Headers" script is actually based on an older version of mentioned script, but the new one contains numerous new features, including what you're asking.

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

    Default

    Is there a way to use both jquery and mootools together? SmoothGallery requires it and I'd like to use that along side with this menu.

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

    Default Plus Minus effect with jQuery

    You can use the jQuery JS library and this snippet on a DL (definition list):

    $("dt a").toggle(
    function(){
    $(this).parent().next().slideDown();
    $(this).find("img").attr("src","/icon/dashminus_sm.gif");
    },
    function(){
    $(this).parent().next().slideUp();
    $(this).find("img").attr("src","/icon/dashplus_sm.gif");
    }
    );

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
  •