All you need to do is change the className of the old selected li element to "" and the new selected li element to "selected". That doesn't require jQuery, but if you remove the code without replacing it with a non-jQuery alternative, of course it's not going to work. The tabs, though, don't depend on jQuery.