This may, to some, sound like a simple question but my programming skills although enthusiastic, are pretty much none existent.
I hope someone out their can help.
I am trying to delay the mouseover event on the following vertical tabs so a user could go directly from tab 1 to tab 4 without tabs 2 and 3 coming up.
Below is the script I am using:
$(function () {
var items = $('#v-nav>ul>li').each(function () {
$(this).mouseover(function () {
//remove previous class and add it to clicked tab
items.removeClass('current');
$(this).addClass('current');
$('#v-nav>div.tab-content').hide().eq(items.index($(this))).show();
window.location.hash = $(this).attr('tab');
});
});
if (location.hash) {
showTab(location.hash);
}
else {
showTab("tab1");
}
function showTab(tab) {
$("#v-nav ul li:[tab*=" + tab + "]").mouseover();
}
// Bind the event hashchange, using jquery-hashchange-plugin
$(window).hashchange(function () {
showTab(location.hash.replace("#", ""));
})
// Trigger the event hashchange on page load, using jquery-hashchange-plugin
$(window).hashchange();
});
I saw a similar question and solution in another stackoverflow post but can't figure out how to adapt it to make it work.
A demo of the vertical tabs can be seen here: http://jsfiddle.net/JAG72/tt7CK/6/
Thanks in advance for any help.