Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This is an amended version of events-mini-ajax.js to support persistent
- * categories.
- *
- * @see http://tri.be/support/forums/topic/calendar-widget-with-different-categories-for-different-pages/
- */
- jQuery(document).ready(function($) {
- $('#calendar_wrap .tribe-mini-ajax').live( 'click', function(e){
- e.preventDefault();
- var month_target = $(this).attr("data-month");
- var params = {
- action: 'calendar-mini',
- eventDate: month_target,
- customCalendarWidgetTax: $("input[name=customCalendarWidgetTax]").val()
- };
- $("#tribe-mini-ajax-month").hide();
- $("#ajax-loading-mini").show();
- $.post(
- TribeMiniCalendar.ajaxurl,
- params,
- function ( response ) {
- $("#ajax-loading-mini").hide();
- $("#tribe-mini-ajax-month").show();
- $("#calendar_wrap").html( response );
- }
- );
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement