reverting to old tabs.js because others don't function correctly in IE8-

This commit is contained in:
Dave Gamache 2011-08-17 22:11:39 -07:00
parent 0ed1e6e1ed
commit 751c738bbe

View File

@ -7,34 +7,36 @@
* 8/17/2011 * 8/17/2011
*/ */
$(document).ready(function() { $(document).ready(function() {
/* Tabs Activiation /* Tabs Activiation
================================================= */ ================================================== */
$('ul.tabs > li').live('click', function(e) {
var $tab = $(this);
var $href = $tab.find('a:first');
var $otherHrefs = $tab.siblings().find('a');
var contentLocation = $href.attr('href');
//Let go if not a hashed one var tabs = $('ul.tabs');
if(contentLocation[0]=="#") {
e.preventDefault();
$otherHrefs.removeClass('active'); tabs.each(function(i) {
//Make Tab Active //Get all tabs
if (!$href.hasClass('active')){ var tab = $(this).find('> li > a');
$href.addClass('active'); tab.click(function(e) {
}
//Show Tab Content & add active class //Get Location of tab's content
$(contentLocation) var contentLocation = $(this).attr('href');
.show()
.addClass('active') //Let go if not a hashed one
.siblings() if(contentLocation.charAt(0)=="#") {
.hide()
.removeClass('active'); e.preventDefault();
}
//Make Tab Active
tab.removeClass('active');
$(this).addClass('active');
//Show Tab Content & add active class
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
}
});
}); });
}); });