2011-05-03 10:36:26 -04:00
|
|
|
/*
|
2011-05-20 12:39:44 -04:00
|
|
|
* Skeleton V1.0.2
|
2011-05-19 15:05:30 -04:00
|
|
|
* Copyright 2011, Dave Gamache
|
2011-05-15 20:02:52 -04:00
|
|
|
* www.getskeleton.com
|
2011-05-19 15:05:30 -04:00
|
|
|
* Free to use under the MIT license.
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
2011-05-20 12:39:44 -04:00
|
|
|
* 5/20/2011
|
2011-05-03 10:36:26 -04:00
|
|
|
*/
|
2011-05-04 21:20:56 -04:00
|
|
|
|
2011-05-02 15:17:18 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
$(document).ready(function() {
|
2011-07-17 11:19:19 -04:00
|
|
|
|
|
|
|
/* Prevent iPhone and iPad to autoscale the page when rotated
|
|
|
|
(http://adactio.com/journal/4470/)
|
|
|
|
================================================================ */
|
|
|
|
|
|
|
|
if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
|
|
|
|
var viewportmeta = document.querySelector('meta[name="viewport"]');
|
|
|
|
if (viewportmeta) {
|
|
|
|
viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
|
|
|
|
document.body.addEventListener('gesturestart', function() {
|
|
|
|
viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
|
|
|
|
}, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
|
2011-05-03 10:36:26 -04:00
|
|
|
/* Tabs Activiation
|
|
|
|
================================================== */
|
2011-06-08 08:42:36 -04:00
|
|
|
var tabs = $('ul.tabs');
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
tabs.each(function(i) {
|
|
|
|
//Get all tabs
|
2011-05-17 20:54:18 -04:00
|
|
|
var tab = $(this).find('> li > a');
|
2011-05-01 11:43:13 -04:00
|
|
|
tab.click(function(e) {
|
|
|
|
|
|
|
|
//Get Location of tab's content
|
2011-05-17 20:54:18 -04:00
|
|
|
var contentLocation = $(this).attr('href') + "Tab";
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
//Let go if not a hashed one
|
|
|
|
if(contentLocation.charAt(0)=="#") {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
//Make Tab Active
|
|
|
|
tab.removeClass('active');
|
|
|
|
$(this).addClass('active');
|
|
|
|
|
2011-06-08 08:42:36 -04:00
|
|
|
//Show Tab Content & add active class
|
|
|
|
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2011-05-03 10:36:26 -04:00
|
|
|
});
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
});
|