javascript - Tabs java scripts with HTML -
i have tabs java scripts, there no default page. want open site chose page default tab.
please me
$(document).ready(function(){ $("#tabs a").on("click", function(e){ e.preventdefault(); var html = $(this).attr('href'); var htmlurl = 'html/'+html; // update newest tab $("#tabs a").removeclass("active"); $(this).addclass("active"); // set new page content $("#content-wrap").hide().load(htmlurl, function(){ $(this).fadein(400); }); }); });
your problem doesn't seem clear me, hovewer these lines didn't make sense.
// update newest tab $("#tabs a").removeclass("active"); $(this).addclass("active"); in these lines , refer $("#tabs a") , remove class , using statement , again re adding class.
Comments
Post a Comment