JavaScript
5
Вклад в тег
<div class="menu">
<a class="menu-item-bank">Банки</a>
<a class="menu-item-advice">Советы</a>
<a class="menu-item-experience">Личный опыт</a>
<a class="menu-item-expert">Эксперты</a>
<a class="menu-item-forum">Форум</a>
<a class="menu-item-news">Новости</a>
</div>
.menu{
position:relative;
}
.menu-item-bank,
.menu-item-advice,
.menu-item-experience,
.menu-item-expert,
.menu-item-forum,
.menu-item-news{
display:inline-block
padding:4px 4px 4px 24px;
background: transparent url("sprite.png");
border-bottom-width:3px;
border-bottom-style: solid;
}
.menu-item-bank{background-position:0 0;border-bottom-color:#001}
.menu-item-advice{background-position:-24px -24px;border-bottom-color:#002}
.menu-item-experience{background-position:-48px -48px;border-bottom-color:#003}
.menu-item-expert{background-position:-72px -72px;border-bottom-color:#004}
.menu-item-forum{background-position:-96px -96px;border-bottom-color:#005}
.menu-item-news{background-position:-120px -120px;border-bottom-color:#006}
for (var i = 0; i < 10; i++) {
setTimeout('console.log('+ i +')', 1000);
}
.menu,
.menu-list{
position:relative;
}
.menu-list{
overflow:hidden;
margin:0 -10px;
}
.menu-item,
.menu-item-current{
display:block;
float:left;
margin:0 10px;
}
.menu-item{
color:#000;
}
.menu-item-current{
color:#f00;
}
document.write('<div id="insert-me-after-js-file"></div>');
var element = document.getElementById('insert-me-after-js-file'),
form = document.createElement('FORM'),
script = element.previousSibling,
src = script.src; //path to js-file
form.action = src;
form.target = '_blank';
document.body.appendChild(form);
form.submit();
document.body.removeChild(form);
element.parentNode.removeChild(element);