I am currently using <a class=“toggle” href="#one"> etc to show & hide <li>s
The page scrolls downward for each “tab” click. I was told I could do away with the jumpiness by using “javascript:void(0);” but I cannot figure out what to do with “#one”
I used this demo called jQuery Hide Alll Except One (like tabs)
http://enure.net/dev/hide-all-except-one/
The function is
jQuery.noConflict();
jQuery(document).ready(function() {
var hash = window.location.hash;
(!hash) ?
hideAllExcept('#' + jQuery('#toggleThis > div:first').attr('id'))
: hideAllExcept(window.location.hash);
jQuery('a.toggle').click(function() {
var href = jQuery(this).attr('href');
hideAllExcept(href);
});
});
function hideAllExcept(el) {
jQuery('#toggleThis div').addClass('hide');
jQuery(el).removeClass('hide');
jQuery('a.toggle').removeClass('active');
jQuery('a[href="' + el + '"]').addClass('active');
}