JavaScript incompatibility with other plugins
-
Hello,
In /inc/js/script.js you use following code:
$.ajaxSetup({ type: "POST", url: ajaxurl, dataType: "html" });
Unfortunately, this sets the defaults for ALL subsequent AJAX requests, also those of other plugins. If those plugins assume jQuery defaults (why wouldn’t they?), there will be some conflicts with this setup.
If you request a json file, while jQuery thinks it’s getting a html file, you’re gonna have a bad time.
If you don’t want to redundantly use those values in all your ajax calls, use something like jQuery extend instead.
Best regards,
Koen
- The topic ‘JavaScript incompatibility with other plugins’ is closed to new replies.