Some small byte savings:

/* replace this: */

if (hash) {
    obj.children('a[href=#' + hash + ']').addClass(classe);
    obj.children('dl[id=' + hash + ']').css({display:'block'});
} else {
    obj.children('a:first').addClass(classe);
    obj.children('dl:first').css({display:'block'});
}

/* ...with this: */

if (hash) {
    $('> a[href=#' + hash + ']',obj).addClass(classe);
    $('#'+hash).show();
} else {
    $('> a:first',obj).addClass(classe);
    $('> dl:first',obj).show();
}

There are a few other places where you could replace .children() as
shown here also.

Joel Birch.

Reply via email to