Browse Source

Build dist/ratchet.js

pull/173/head
Cox Chen 12 years ago
parent
commit
4e91d1eb8b
  1. 18
      dist/ratchet.js

18
dist/ratchet.js vendored

@ -117,12 +117,13 @@
'slide-out' : 'slide-in', 'slide-out' : 'slide-in',
'fade' : 'fade' 'fade' : 'fade'
}; };
var bars = { var bars = {
bartab : '.bar-tab', bartab : '.bar-tab',
bartitle : '.bar-title', bartitle : '.bar-title',
barfooter : '.bar-footer', barfooter : '.bar-footer',
barheadersecondary : '.bar-header-secondary' barheadersecondary : '.bar-header-secondary'
} };
var cacheReplace = function (data, updates) { var cacheReplace = function (data, updates) {
PUSH.id = data.id; PUSH.id = data.id;
@ -509,7 +510,8 @@
window.addEventListener('click', function (e) { if (getTarget(e)) e.preventDefault(); }); window.addEventListener('click', function (e) { if (getTarget(e)) e.preventDefault(); });
window.addEventListener('popstate', popstate); window.addEventListener('popstate', popstate);
}();/* ---------------------------------- }();
/* ----------------------------------
* TABS v1.0.0 * TABS v1.0.0
* Licensed under The MIT License * Licensed under The MIT License
* http://opensource.org/licenses/MIT * http://opensource.org/licenses/MIT
@ -525,7 +527,7 @@
window.addEventListener("touchend", function (e) { window.addEventListener("touchend", function (e) {
var activeTab; var activeTab;
var activeBody; var activeBodies;
var targetBody; var targetBody;
var targetTab; var targetTab;
var className = 'active'; var className = 'active';
@ -547,11 +549,15 @@
if (!targetBody) return; if (!targetBody) return;
activeBody = targetBody.parentNode.querySelector(classSelector); activeBodies = targetBody.parentNode.querySelectorAll(classSelector);
if (activeBody) activeBody.classList.remove(className); if (activeBodies) {
for (var i = 0; i < activeBodies.length; i++){
activeBodies[i].classList.remove(className);
}
}
targetBody.classList.add(className) targetBody.classList.add(className);
}); });
window.addEventListener('click', function (e) { if (getTarget(e.target)) e.preventDefault(); }); window.addEventListener('click', function (e) { if (getTarget(e.target)) e.preventDefault(); });

Loading…
Cancel
Save