How to convert this jquery code into simple javascript?
- by metal-gear-solid
How to convert this jquery code into simple javascript
var $jt = jQuery.noConflict();
$jt(function($) {
$jt('.tabs a').click(function(){
switch_tabs($jt(this));
return false;
});
switch_tabs($jt('.defaulttab'));
});
function switch_tabs(obj)
{
$jt('.tab-content').hide();
$jt('.tabs a').removeClass("selected");
var id = obj.attr("rel");
$jt('#'+id).show();
obj.addClass("selected");
}
I want to use same effect without the need of jquery
If i remove jquery and place simple javascript , functionality should remain