
25.06.2008, 02:26
|
|
Постоянный
Регистрация: 30.08.2007
Сообщений: 773
Провел на форуме: 3069349
Репутация:
808
|
|
Так и есть - переменные просто перезаписывают предудущие значения.
Во втором примере всё просто - достаточно поменять во втором участке кода идентификаторы на уникальные, например, дописать "_2":
Код:
// А именно, здесь:
<dl id="accordionExample_2" class="accordion">
<dd class="accordion_content">
<div id="example_4_2">
<div id="example_4_content_2">
// ... и здесь:
<div id="example_4_frame_2">
<img id="example_4_previous_2" src="menu_files/ex4_prev.gif" alt="move previous" />
<img id="example_4_next_2" src="menu_files/ex4_next.gif" alt="move next" />
</div>
Внести для них изменения в стили:
Код:
#example_4, #example_4_2 {
position: relative; /* important */
overflow: hidden; /* important */
width: 172px; /* important */
height: 212px; /* important */
background: #000;
}
#example_4_frame, #example_4_frame_2 {position: relative}
#example_4_frame, #example_4_frame_2 img {position: absolute;}
#example_4_previous, #example_4_previous_2 {top: 0; left: 0;}
#example_4_next, #example_4_next_2 {top: 192px; left: 0;}
#example_4_content, #example_4_content_2 {
position: absolute;
margin-top: 20px;
left: 0;
}
И запустить конструктор ещё раз, с новыми параметрами:
Код:
new iCarousel("example_4_content_2", {
idPrevious: "example_4_previous_2",
idNext: "example_4_next_2",
idToggle: "undefined",
item: {
klass: "example_4_item",
size: 86
},
animation: {
direction: "top",
duration: 250,
amount: 2
}
});
Самый незатейливый путь.
|
|
|