changing to lastest jQuery version and using new tabs js
This commit is contained in:
parent
2dfa28cea9
commit
b43be292ee
@ -72,7 +72,7 @@
|
||||
|
||||
<!-- JS
|
||||
================================================== -->
|
||||
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
|
||||
<script src="javascripts/tabs.js"></script>
|
||||
|
||||
<!-- End Document
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Skeleton V1.1
|
||||
* Skeleton V1.2
|
||||
* Copyright 2011, Dave Gamache
|
||||
* www.getskeleton.com
|
||||
* Free to use under the MIT license.
|
||||
@ -8,35 +8,22 @@
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('body').delegate('ul.tabs > li > a', 'click', function(e) {
|
||||
|
||||
/* Tabs Activiation
|
||||
================================================== */
|
||||
//Get Location of tab's content
|
||||
var contentLocation = $(this).attr('href');
|
||||
|
||||
var tabs = $('ul.tabs');
|
||||
//Let go if not a hashed one
|
||||
if(contentLocation.charAt(0)=="#") {
|
||||
|
||||
tabs.each(function(i) {
|
||||
e.preventDefault();
|
||||
|
||||
//Get all tabs
|
||||
var tab = $(this).find('> li > a');
|
||||
tab.click(function(e) {
|
||||
//Make Tab Active
|
||||
$(this).parent().siblings().children('a').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
|
||||
//Get Location of tab's content
|
||||
var contentLocation = $(this).attr('href');
|
||||
//Show Tab Content & add active class
|
||||
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
|
||||
|
||||
//Let go if not a hashed one
|
||||
if(contentLocation.charAt(0)=="#") {
|
||||
|
||||
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');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
4
stylesheets/skeleton.css
vendored
4
stylesheets/skeleton.css
vendored
@ -231,6 +231,4 @@
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user