You have no favorites at this time.
Select the heart icon on the event image that you would like to save.
A list will be created for easy viewing.
');
//
Favorites can be shared with friends or added to you calendar.
}
},1500);
}
},
error : function(jqXHR, textStatus, errorThrown) {
console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown);
}
});
}
function updateFavorites2(element) {
var $this = jQuery(element);
//console.log('event '+jQuery(this).data('event-id')+' clicked');
//console.log('sending request to '+ajaxurl);
var event_id = $this.data('event-id');
var layout = $this.data('layout');
jQuery.ajax({
type : 'POST',
cache: false,
data : {
action: 'update_favorites',
event_id: event_id,
layout: layout
},
url : ajaxurl,
success : function(data) {
console.log(data);
//jQuery('.mobfm-add-favorite-event').each( function(i, el) {
// if(jQuery(el).data('event-id') == event_id) {
// jQuery(el).html(data);
// }
//});
$this.html(data);
//alert($this.closest('.mob-item').html());
$this.closest('.mob-item').remove();
if(jQuery('.mob-section-content .mob-item').length <= 0)
{
jQuery('.mob-section-content').html('You have no favorites at this time.
Select the heart icon on the event image that you would like to save.
A list will be created for easy viewing.
');
//
Favorites can be shared with friends or added to you calendar.
}
},
error : function(jqXHR, textStatus, errorThrown) {
console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown);
}
});
}