Support

Home Forums Event Espresso Premium EE4 jQuery conflict "undefined is not a function"

EE4 jQuery conflict "undefined is not a function"

Posted: October 16, 2014 at 9:03 am


Michael

October 16, 2014 at 9:03 am

Hi. I’m getting the following error on a page that is using a plugin to display posts in a grid via javascript.

jQuery(document).ready(function($){

	$("#ee_filter_cat").change(function() {
		var ee_filter_cat_id = $("option:selected").attr('class');
		var ee_filter_table_rows = $(".espresso-table-row");
		console.log(ee_filter_cat_id);
		ee_filter_table_rows.each(function() {
			if ( $(this).hasClass( ee_filter_cat_id ) ) {
				$(this).show();
			} else  {
				$(this).hide();
			}
		});
		if( ee_filter_cat_id === 'ee_filter_show_all') {
			ee_filter_table_rows.show();
		}
	});

	$('.footable').footable();
Uncaught TypeError: undefined is not a function
});

This is the only error that I see in the Chrome Dev Tools console. Is there a quick fix?


Michael

October 16, 2014 at 9:11 am

I also get it on regular archive pages:
Uncaught TypeError: undefined is not a function espresso_events_table_template.js?ver=1.2.p:20(anonymous function) espresso_events_table_template.js?ver=1.2.p:20j jquery.js?ver=1.11.1:2k.fireWith jquery.js?ver=1.11.1:2m.extend.ready jquery.js?ver=1.11.1:2J jquery.js?ver=1.11.1:2


Josh

  • Support Staff

October 16, 2014 at 9:53 am

Hi Michael,

Yes, and this fix will be in a future update of the table template add-on. You can apply the fix by opening up its scripts/espresso_events_table_template.js file and around line 20 you’ll see this:

$('.footable').footable();

You remove and replace with this:

if ( $.isFunction($.fn.footable) ) {
	$('.footable').footable();
}


Michael

October 16, 2014 at 10:24 am

perfect, thanks for the quick response.


Josh

  • Support Staff

October 16, 2014 at 10:32 am

You’re welcome.

The support post ‘EE4 jQuery conflict "undefined is not a function"’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso