ererere
rererer
Страница: 1
Сообщений 1 страница 4 из 4
Поделиться32021-12-14 01:29:42
в верхнюю форму
Код:
<!-- Стиль меню таблицы в объявлении -->
<style type="text/css">
/****************************************
Таблица с переключаемыми Вкладками
****************************************/
#tab2,#tab2*{
paddibg:0;
margin:0;
}
#tab2 {
background:transparent url(https://forumstatic.ru/files/0014/09/1e/94539.jpg) 0 0 no-repeat;
height:222px;
width:393px;
}
#tab2,#tab2 td{
border:none 0 transparent!important;
border-collapse:collapse;
}
img[data^="tab"]{
cursor:pointer;
height:100%;
border:none 0 transparent!important;
}
.tab-content {
display:none;
width:100%;
height:189px;
color:#fff;
overflow-y:auto;
}
</style>
<script type="text/javascript">
$.fn.switch_tabs = function() {
var tbl = this,knopK = $("img[data^='tab']",tbl);
knopK.each(function(){
var arr = $(this).attr('data').split(",");
$(this).css("background-image","url("+arr[1]+")")
}); knopK.css("background-position","120% 10000px")
knopK.css("background-repeat","no-repeat")
knopK.click(function(){
knopK.removeClass('active');
$(this).addClass('active');
var arr = $(this).attr('data').split(",");
tbl.css("background-image","url("+arr[1]+")")
$(".tab-content",tbl).hide();
$("#"+arr[0]+"",tbl).show();
});
}
</script>Поделиться42021-12-14 01:29:59
Код:
<!-- Таблица -->
<table id="tab2" class="tbl-0" border="0">
<tr>
<td class="butt" valign=center height=26> <!-- Секция кнопок -->
<img width="72" data="tab-1,https://forumstatic.ru/files/0014/09/1e/94539.jpg" src="/i/blank.gif" class="active"/>
<img width="109" data="tab-2,https://forumstatic.ru/files/0014/09/1e/95950.jpg" src="/i/blank.gif"/>
<img width="92" data="tab-3,https://forumstatic.ru/files/0014/09/1e/92359.jpg" src="/i/blank.gif"/>
<img width="100" data="tab-4,https://forumstatic.ru/files/0014/09/1e/79020.jpg" src="/i/blank.gif"/>
</td>
</tr>
<tr>
<td class="content" align=center>
<!-- Контейнер контента 1-й кнопки -->
<div id="tab-1" class="tab-content" style="display:block;">
Контент 1-й кнопки
</div>
<!-- Контейнер контента 2-й кнопки -->
<div id="tab-2" class="tab-content">
Контент 2-й кнопки
</div>
<!-- Контейнер контента 3-й кнопки -->
<div id="tab-3" class="tab-content">
Контент 3-й кнопки
</div>
<!-- Контейнер контента 4-й кнопки -->
<div id="tab-4" class="tab-content">
Контент 4-й кнопки
</div>
</td>
</tr>
</table><script>$("#tab2").switch_tabs()</script><!--//End/-switch Tabs -->Страница: 1