5 thoughts on “Expand Ajax-Spoiler effects 2”

  1. Hello there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success. If you know of any please share. Thank you!

  2. No worries dude.. sorry for any hassles i gave you in correcting the mistakes.
    I would have thought the adding script in the code wrapper would have made the > displayable, nevermind.

    Hope that someone can find a use for this and maybe expand it a little.
    would be great to see a plugin that would add a selection the the widget options to make it collapsible or not on load.

    By the way 082net thanks for the spoiler script. It the only one i found that does what it says it does.

  3. Global Native// I’ve edited your first comment with ‘code’ tag and removed your other comments for fixing broken codes. Is that right:???:

    Oh, I forgot to say thanks:)

  4. Add Ajax-Spoiler to widgets with out recoding them.

    I was working on the collapsible navigation based on your Ajax-Spoiler plugin and made a few changes sop that i wouldn’t have to hand code every widget. These changes enable you also to add callapsable menus to widgets with just a few clicks. I am using the mootools code.

    This will work as long as the widget has a title with the class “collapsible” and a div wrapper for the content beginning straight after the header . I.E. the included widget search in the widgets package does not have a title and a little hand coding will fix this.

    I will one day get around to making this a WP plugin.

    ————————————————————————-
    with site.custom.js use….( for mootools
    ————————————————————————-

    function mySidebarLoader() {

    // do not add spoiler to these widgets ( Titles must be exactly the same)
    var ignore = new Array("Title 1", "Title 2", "ETC");

    // Collaspse these onload ( Titles must be exactly the same)
    var collaspe = new Array("Title 1", "Title 2", "ETC");

    $$('.collaspable').each(function(el){

    var tid = el;
    if(!ignore.test(tid.firstChild.nodeValue)){

    var ele = el.getNext();

    if(tid.nodeName == 'H3' && ele.nodeName != 'a'){
    tid.onclick = function(){Spoiler.Collapse(ele, 'blind', tid, {duration: 400}); return false;};
    tid.addClassName('effcollapse');
    if(ele.hasClassName('hide_first') || collaspe.test(tid.firstChild.nodeValue)) {
    Spoiler.Collapse(ele, 'blind', tid, {duration: 600});
    }
    }

    }
    }, this);
    }
    window.addEvent('load', mySidebarLoader);

    ————————————————————————-
    then with your dynamic sidebar code.
    ————————————————————————-
    // The trick being to add the class "collapsible" to the header
    // and wrap the content in a single div beginning from straight after the header to the end of the widget

    if ( function_exists('register_sidebar') )
    register_sidebars((2),array(
    'before_widget' => '

    ',
    'before_title' => '

    ',
    'after_title' => '

    ',
    ));

Comments are closed.