accordion-effect - help me!

accordion-effect - help me!

hi jquery-workers

i am a really beginner in programming and understanding jquery. my problem is probably easy to fix. look at my code and follow my statements:

jQuery.fn.extend({
  haccordion: function(params){
    var jQ = jQuery;
    var params = jQ.extend({
      speed: 550,
      headerclass: "navigation",
      headerclass2: "imp",
      contentclass: "content",
      contentwidth: 337
    },params);
    return this.each(function(){
      jQ("."+params.headerclass,this).mouseover(function(){
        var p = jQ(this).parent()[0];
        if (p.opened != "undefined"){
          jQ(p.opened).next("div."+params.contentclass).animate({
            width: "0px"
          },params.speed);
        }
        p.opened = this;
        jQ(this).next("div."+params.contentclass).animate({
          width: params.contentwidth + "px"
        }, params.speed);
      
      });
    
    });
  }
});


I would like to have in JQ.extend, wathever that is (predefined function?), one headerclass more (like my example: headerclass2!).

The idea behind the headerclass2 is simple. In that way, i get a css-class more in xHTML/CSS to handle with it. Headerclass2 gets the same effect/function like headerclass (normal).

But how can I define headerclass2 for the same effect? I tryed it with a "plus":

jQ("."+params.headerclass+params.headerclass2,this).mouseover(function(){[/quote]


Ive got no idea...
    • Topic Participants

    • sihe