Support

Home Forums Event Espresso Premium Conflict with Datatables being used elsewhere on site

Conflict with Datatables being used elsewhere on site

Posted: December 4, 2013 at 2:22 pm

Viewing 2 reply threads


sfgolfer

December 4, 2013 at 2:22 pm

I am using DataTables in a custom PHP application and it does not work unless:

1) I deactivate Events Espresso or
2) I keep Events Espresso and disable the pagination script, pagination.js (I renamed the file).

Is there a way for Events Espresso to not embed its scripts unless it requires it on the registration and admin pages?


Josh

  • Support Staff

December 4, 2013 at 3:48 pm

Hi there,

In most cases Event Espresso loads only scripts where needed. I’m afraid this isn’t the case with the pagination.js script though. I opened up a ticket to make it so pagination.js is only loaded where needed.

For the time being, if you’re not using the pagination feature on the front end, you can dequeue it. It also may be worth looking into why it’s conflicting. It might that in your dataTables script $ is being used as a shorthand for jQuery, which could be easily fixed by wrapping it in a no-conflict wrapper.

There is a good reference on how to use $ for jQuery in WordPress here:

http://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/


sfgolfer

December 4, 2013 at 5:07 pm

Ahh, the $ shortcut. I learned something new.

Until I can tweak my application for noconflict, I ommitted the noConflict from pagination.js and everything seems to be working in unision.

Viewing 2 reply threads

The support post ‘Conflict with Datatables being used elsewhere on site’ 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