Здравствуйте. Помогите пожалуйста со скриптом. Есть аккордион меню на моем тестовом сайте но оно раскрывается по нажатию а мне нужно тобы оно раскрывалось по наведеню курсора мыши.
var s5_am_h3_background = document.getElementById("s5_accordion_menu").getElementsByTagName("H3"); for (var s5_am_h3_background_y=0; s5_am_h3_background_y<s5_am_h3_background.length; s5_am_h3_background_y++) { s5_am_h3_background[s5_am_h3_background_y].onclick = s5_am_h3_background_load; }
var s5_am_element = document.getElementById("s5_accordion_menu").getElementsByTagName("DIV"); for (var s5_am_element_y=0; s5_am_element_y<s5_am_element.length; s5_am_element_y++) { if (s5_am_element[s5_am_element_y].className == "s5_accordion_menu_element") { if (s5_am_element[s5_am_element_y].innerHTML != "") { s5_am_element[s5_am_element_y].style.display = s5_accordion_menu_display; } if (s5_am_element[s5_am_element_y].innerHTML == " " || s5_am_element[s5_am_element_y].innerHTML == "") { s5_am_element[s5_am_element_y].previousSibling.className = "s5_am_toggler s5_am_not_parent"; } if (s5_am_element[s5_am_element_y].innerHTML != " " && s5_am_element[s5_am_element_y].innerHTML != "") { s5_am_element[s5_am_element_y].previousSibling.className = "s5_am_toggler s5_am_parent"; } } }
var s5_am_current_level = -1;
var s5_am_h3_current = document.getElementById("s5_accordion_menu").getElementsByTagName("H3"); for (var s5_am_h3_current_y=0; s5_am_h3_current_y<s5_am_h3_current.length; s5_am_h3_current_y++) { if (s5_am_h3_current[s5_am_h3_current_y].id == "current") { s5_am_current_level = s5_am_h3_current_y; } }
var s5_am_li_current = document.getElementById("s5_accordion_menu").getElementsByTagName("LI"); for (var s5_am_li_current_y=0; s5_am_li_current_y<s5_am_li_current.length; s5_am_li_current_y++) { if (s5_am_li_current[s5_am_li_current_y].id == "current") {
if (s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.className == "s5_accordion_menu_element") { s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.id = "s5_am_parent_div_current"; }
else if (s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.parentNode.className == "s5_accordion_menu_element") { s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.parentNode.id = "s5_am_parent_div_current"; }
else if (s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.parentNode.parentNode.className == "s5_accordion_menu_element") { s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.parentNode.parentNode.id = "s5_am_parent_div_current"; }
else if (s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.parentNode.parentNode.parentNode.className == "s5_accordion_menu_element") { s5_am_li_current[s5_am_li_current_y].parentNode.parentNode.parentNode.parentNode.parentNode.id = "s5_am_parent_div_current"; }
var s5_am_div_current = document.getElementById("s5_accordion_menu").getElementsByTagName("DIV"); for (var s5_am_div_current_y=0; s5_am_div_current_y<s5_am_div_current.length; s5_am_div_current_y++) { if (s5_am_div_current[s5_am_div_current_y].id == "s5_am_parent_div_current") { s5_am_current_level = s5_am_div_current_y - 1; } }
} }
s5_am_openElement = s5_am_current_level;
var s5_accordion_menu = new Accordion($('s5_accordion_menu'), 'h3.s5_am_toggler', 'div.s5_accordion_menu_element', { opacity: true, allowMultipleOpen: true, display: s5_am_openElement, alwaysHide: true });
var s5_am_h3_first = document.getElementById("s5_accordion_menu").getElementsByTagName("H3"); for (var s5_am_h3_first_y=0; s5_am_h3_first_y<s5_am_h3_first.length; s5_am_h3_first_y++) { if (s5_am_h3_first_y == s5_am_current_level) { if (s5_am_h3_first[s5_am_h3_first_y].nextSibling.innerHTML == "" || s5_am_h3_first[s5_am_h3_first_y].nextSibling.innerHTML == " ") { s5_am_h3_first[s5_am_h3_first_y].className = "s5_am_toggler s5_am_open s5_am_not_parent"; } if (s5_am_h3_first[s5_am_h3_first_y].nextSibling.innerHTML != "" && s5_am_h3_first[s5_am_h3_first_y].nextSibling.innerHTML != " ") { s5_am_h3_first[s5_am_h3_first_y].className = "s5_am_toggler s5_am_open s5_am_parent"; } } }
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Здравствуйте, подскажите какой тег использовать для увеличения значения, пример на картинке.
Вроде, про такой тег я слышала. Если есть тег прогресс бар, значит и такое должно быть.
Question
djwolf
Здравствуйте. Помогите пожалуйста со скриптом. Есть аккордион меню на моем тестовом сайте но оно раскрывается по нажатию а мне нужно тобы оно раскрывалось по наведеню курсора мыши.
Вот Сайт
А вот и сам код меню:
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.