jQuery is not defined in WordPress admin

If you have a WordPress install with many different plugins, you may experience that some jQuery functionality will be lost in the admin panel (i.e. you won’t be able to move the content blocks around your Dashboard). When you open the console (press F12 in most browsers), you will see several errors that will read:
Uncaught ReferenceError: jQuery is not defined
You may also see something like:
Failed to load resource: the server responded with a status of 403 - https://www.yourdomain.com/wp-admin/load-scripts.php?c=1&load%5B%5D=sa…ry-ui-slider,jquery-touc&load%5B%5D=h-punch,iris,wp-color-picker&ver=4.3.1
Here is how you fix both of these with two easy steps…

Continue Reading

jQuery/Ajax XMLHttpRequest() problem in Internet Explorer – “Object doesn’t support this property or method”

This is a common problem with Microsoft Internet Explorer browser (with ActiveX, actually) and it has been present forever. While calling and Ajax function

req = new XMLHttpRequest();

IE will say that Object doesn’t support this property or method. In Firefox and Google Chrome above code works with no issues, so all we have to do is implement an if statement, checking for our browser. If the browser is detected as Internet Explorer, we will load ActiveX instead of XMLHttpRequest.

Continue Reading