qlstudio

TEC events.js

Oct 6th, 2012
47
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function($) {
  2.     // prepare calendar for popups
  3.     $("table.tribe-events-calendar tbody tr").each(function(index) {
  4.         // add a class of "right" to Friday & Saturday so tooltips stay onscreen
  5.         $(this).find("td:gt(3)").addClass("tribe-events-right");
  6.     });
  7.  
  8.     // big popups
  9.     $("table.tribe-events-calendar:not(.tribe-events-calendar-widget) .tribe-events-event:not(.daynum)").live('mouseenter', function() {
  10.        
  11.         // one for IE6, one for everybody else
  12.         if ($.browser.msie && $.browser.version == 6) {
  13.             var bottomPad = $(this).parents("td").outerHeight() + 5;
  14.         }
  15.         else {
  16.             var bottomPad = $(this).find('a').outerHeight() + 18;
  17.         }
  18.        
  19.         $(this).find(".tribe-events-tooltip").stop(true, false).css('bottom', bottomPad).show();
  20.     }).live('mouseleave', function() {
  21.         if ($.browser.msie && $.browser.version <= 9) {
  22.          $(this).find(".tribe-events-tooltip").stop(true, false).hide()
  23.       } else {
  24.          $(this).find(".tribe-events-tooltip").stop(true, false).fadeOut(200);
  25.       }
  26.     });
  27.    
  28.     // little popups
  29.     $("table.tribe-events-calendar-widget .tribe-events-event:has(a)").live('mouseenter', function() {
  30.        
  31.         // one for IE6, one for everybody else
  32.         if ($.browser.msie && $.browser.version == 6) {
  33.             var bottomPad = $(this).outerHeight();
  34.         }
  35.         else {
  36.             var bottomPad = $(this).outerHeight() + 3;
  37.         }
  38.        
  39.         $(this).find(".tribe-events-tooltip").stop(true, false).css('bottom', bottomPad).fadeIn(300);
  40.     }).live('mouseleave', function() {
  41.         if ($.browser.msie && $.browser.version <= 9) {
  42.          $(this).find(".tribe-events-tooltip").stop(true, false).hide()
  43.       } else {
  44.          $(this).find(".tribe-events-tooltip").stop(true, false).fadeOut(200);
  45.       }
  46.     });
  47.    
  48.     // datepicker
  49.     $(".tribe-events-events-dropdown").live('change', function() {
  50.         baseUrl = $(this).parent().attr("action");
  51.        
  52.         url = baseUrl + $('#tribe-events-events-year').val() + '-' + $('#tribe-events-events-month').val();
  53.  
  54.       $('.ajax-loading').show();
  55.         $.pjax({ url: url, container: '#tribe-events-content', fragment: '#tribe-events-content', timeout: 1000 });
  56.     });
  57.    
  58.     // PJAX
  59.     $('.tribe-events-prev-month a, .tribe-events-next-month a').pjax('#tribe-events-content', { timeout: 10000, fragment: '#tribe-events-content' }).live('click', function() {
  60.      $('.ajax-loading').show();
  61.    });
  62.    
  63. });
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×