app.js.orig 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. $(document).ready(function () {
  2. /* Use this js doc for all application specific JS */
  3. /* TABS --------------------------------- */
  4. /* Remove if you don't need :) */
  5. function activateTab($tab) {
  6. var $activeTab = $tab.closest('dl').find('a.active'),
  7. contentLocation = $tab.attr("href") + 'Tab';
  8. //Make Tab Active
  9. $activeTab.removeClass('active');
  10. $tab.addClass('active');
  11. <<<<<<< HEAD
  12. //Show Tab Content
  13. $(contentLocation).closest('.tabs-content').children('li').hide();
  14. =======
  15. //Show Tab Content
  16. $(contentLocation).closest('ul.tabs-content').find('> li').hide();
  17. >>>>>>> bd561f03d730cf888789bb44e12c4e56c5f445ae
  18. $(contentLocation).show();
  19. }
  20. $('dl.tabs').each(function () {
  21. //Get all tabs
  22. var tabs = $(this).children('dd').children('a');
  23. tabs.click(function (e) {
  24. activateTab($(this));
  25. });
  26. });
  27. if (window.location.hash) {
  28. activateTab($('a[href="' + window.location.hash + '"]'));
  29. }
  30. /* PLACEHOLDER FOR FORMS ------------- */
  31. /* Remove this and jquery.placeholder.min.js if you don't need :) */
  32. $('input, textarea').placeholder();
  33. /* DROPDOWN NAV ------------- */
  34. /*
  35. $('.nav-bar li a, .nav-bar li a:after').each(function() {
  36. $(this).data('clicks', 0);
  37. });
  38. $('.nav-bar li a, .nav-bar li a:after').bind('touchend click', function(e){
  39. e.stopPropagation();
  40. e.preventDefault();
  41. var f = $(this).siblings('.flyout');
  42. $(this).data('clicks', ($(this).data('clicks') + 1));
  43. if (!f.is(':visible') && f.length > 0) {
  44. $('.nav-bar li .flyout').hide();
  45. f.show();
  46. }
  47. });
  48. $('.nav-bar li a, .nav-bar li a:after').bind(' touchend click', function(e) {
  49. e.stopPropagation();
  50. e.preventDefault();
  51. if ($(this).data('clicks') > 1) {
  52. window.location = $(this).attr('href');
  53. }
  54. });
  55. $('.nav-bar').bind('touchend click', function(e) {
  56. e.stopPropagation();
  57. if (!$(e.target).parents('.nav-bar li .flyout') || $(e.target) != $('.nav-bar li .flyout')) {
  58. e.preventDefault();
  59. }
  60. });
  61. $('body').bind('touchend', function(e) {
  62. if (!$(e.target).parents('.nav-bar li .flyout') || $(e.target) != $('.nav-bar li .flyout')) {
  63. $('.nav-bar li .flyout').hide();
  64. }
  65. });
  66. */
  67. /* DISABLED BUTTONS ------------- */
  68. /* Gives elements with a class of 'disabled' a return: false; */
  69. <<<<<<< HEAD
  70. });
  71. =======
  72. });
  73. >>>>>>> bd561f03d730cf888789bb44e12c4e56c5f445ae