cript type= text/javascript src= ../ jquery.js gt; lt;/script gt;
lt; script type= text/javascript src= ../ jquery.cookie.js gt; lt;/script gt;
lt; script type= text/javascript gt;
$ (document) .ready (function () {
$ ( ul # my-menu ul ). each (function (i) {// Check each submenu: ($. cookie ( submenuMark- + i)) {// If index of submenu is marked in cookies:
$(this).show().prev().removeClass(laquo;collapsedraquo;).addClass(laquo;expandedraquo;);// Show it (add apropriate classes)
} else {
$(this).hide().prev().removeClass(laquo;expandedraquo;).addClass(laquo;collapsedraquo;);// Hide it
}
$ (this) .prev (). addClass ( collapsible ). click (function () {// Attach an event listenerthis_i=$ ( ul # my-menu ul ).index ($ (this) .next ());//The index of the submenu of the clicked link ($ (this) .next (). css ( display ) == none ) {
//When opening one submenu, we hide all same level submenus:
$(this).parent(laquo;liraquo;).parent(laquo;ulraquo;).find(laquo;ulraquo;).each(function(j) {(j!=this_i) {
$ (this) .slideUp (200, function () {
$(this).prev().removeClass(laquo;expandedraquo;).addClass(laquo;collapsedraquo;);($(laquo;ul#my-menu ul ). index ($ (this)));
});
}
});
//: end
$ (this) .next (). slideDown (200, function () {// Show submenu:
$(this).prev().removeClass(laquo;collapsedraquo;).addClass(laquo;expandedraquo;);(this_i);
});
} else {
$ (this) .next (). slideUp (200, function () {// Hide submenu:
$(this).prev().removeClass(laquo;expandedraquo;).addClass(laquo;collapsedraquo;);(this_i);
$ (this) .find ( ul ). each (function () {
$ (this) .hide (0, cookieDel ($ ( ul # my-menu ulraquo;).index($(this)))).prev().removeClass(laquo;expandedraquo;).addClass(laquo;collapsedraquo;);
});
});
} false;// Prohibit the browser to follow the link address
});
});
}); cookieSet (index) {
$. cookie ( submenuMark- + index, opened raquo ;, {expires: null, path: /});// Set mark to cookie (submenu is shown):
} cookieDel (index) {
$. cookie ( submenuMark- + index, null, {expires: null, path: /});// Delete mark from cookie (submenu is hidden):
}
lt;/script gt;
lt; style type= text/css gt; .sample-menu {padding: 0; margin: 10px 15px; } .sample-menu li {padding: 2px 0; margin: 0; list-style: none; } .sample-menu li ul {padding: 0; margin: 0 0 0 15px; } # my-menu a {padding-left: 8px; } # my-menu a.collapsed {background: url ( collapsed.gif ) left 6px no-repeat; } # my-menu a.expanded {background: url ( expanded.gif ) left 6px no-repeat; }
lt;/style gt;
lt; script type= text/javascript src= # justify gt; lt; script type= text/javascript" gt; .init ({apiId: 3041094, onlyWidgets: true});
lt;/script gt;
lt;/head gt;
lt; body gt;
lt; style type= text/css gt;
lt;! -
{image: url ( ../ img/hd2.jpg ); repeat: no-repeat;
}
# vk_like_main
{: absolute ;: 220px ;: 680px;
}
# div_kontakty
{: absolute;: 5px;: 1070px;
}
# div_kontakty2
{: absolute ;: 50px; align: center ;: 1090px; size: 9pt ;: black ;: 140px ;: 100px ;: caption;
}
# div-left-menu-txt
{: absolute ;: 175px;: 50px;
}
# div-left-menu-img
{: absolute ;: 145px ;: 0px;
}
# div-sha
{: absolute;: 15px;: 360px;
}
# black
{: absolute;: 0px;: 0px;
}
. 4.3 Сторінки командних статистик
На даній странице Відображається п...