Grow your CSS skills. Land your dream job.

jQuery idTabs

  • # May 23, 2010 at 12:15 pm

    Im using this simple jQuery plugin for a mouse over tabbed navigation http://www.sunsean.com/idTabs/

    It does the job nicely with one exception, on click I need items go to a new page, rather than showing a hidden div on the existing page. (I’m using mouse over to accomplish that)

    Because of this, id like to use rel="div_name" to show the hidden div as opposed to href="#div_name " as it currently does.

    Any Suggestions? Here is the function":

    Quote:
    //Setup Tabs
    var showId = function(){
    if($(this).is(‘.’+s.selected))
    return s.change; //return if already selected
    var id = "#"+this.href.split(‘#’)[1];
    var aList = []; //save tabs
    var idList = []; //save possible elements
    $("a",tabs).each(function(){
    if(this.href.match(/#/)) {
    aList.push(this);
    idList.push("#"+this.href.split(‘#’)[1]);
    }
    });
    if(s.click && !s.click.apply(this,[id,idList,tabs,s])) return s.change;

    Thanks!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".