How to convert this jquery code into noconflict

Posted by metal-gear-solid on Stack Overflow See other posts from Stack Overflow or by metal-gear-solid
Published on 2010-04-27T10:10:46Z Indexed on 2010/04/27 10:13 UTC
Read the original article Hit count: 282

Filed under:
|

will we have to replace every $ with jquery?

$(document).ready(function() {

    $('.tabs a').click(function(){
        switch_tabs($(this));
    });

    switch_tabs($('.defaulttab'));

});

function switch_tabs(obj)
{
    $('.tab-content').hide();
    $('.tabs a').removeClass("selected");
    var id = obj.attr("rel");

    $('#'+id).show();
    obj.addClass("selected");
}

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript