Оба кода очень просты, поэтому я не буду говорить здесь много чушь, просто загрузите код
Код 1,
function ntabs (thisObj, num) {if (thisObj.classname == "active") return; var tabobj = thisobj.parentnode.id; var tableist = document.getElementbyid (tabobj) .getelementsbytagname ("li"); for (i = 0; i <tablist.length; i ++) {if (i == num) {thisObj.classname = "active"; document.getElementById (taboBJ+"_ Cont"+i) .style.display = "block"; } else {tableist [i] .classname = "Нормальный"; document.getElementById (taboBJ+"_ Cont"+i) .Style.display = "none"; }}}Код 2,
$ (document) .ready (function () {var $ tab_li = $ ('. tab ul li'); $ tab_li.hover (function () {$ (this) .addclass ('selected'). Siblings (). removeclass ('selected'); var index = $ tab_li.index (this); div '). EQ (index) .show ().