How To Fix TypeError: $ is not a function on line... in Oxygen Builder

Published: 10 months ago

This article shows you how to fix TypeError: $ is not a function on line 1 (or any line) in Oxygen Builder.

Luckily this is a really simple fix, and it's caused by WordPress itself.


Whenever you add any jQuery code to Oxygen (via the JS section of a Code Block), this error will trigger because WordPress does not recognize jQuery well. Despite that issue, it does support jQuery, and it comes pre installed on the CMS. All you need to do is make it easy for WP to understand that you do, infact, want to use jQuery code on you Oxygen Builder Code Blog.

Here’s how to fix it. On a simple chunk of jQuery code, simply swap the $ for jQuery. Here’s an example:

Original: $('.my-paroller').paroller();
Oxygen Builder Compatible: jQuery('.my-paroller').paroller();

For longer jQuery in an Oxygen Builder Code Block that’s toggling the “TypeError: $ is not a function” error, use this:

(function($) {YOUR CODE})( jQuery );

That should solve your problem.

Join Our Newsletter
Here's what you get: A once a week newsletter that contains original content, aggregated posts, WordPress deals, and anything else we think you'd like. We don't spam or sell your email address. Unsub at any time.
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
Jeff K.
7 months ago

It works wonderfully, the error message has disappeared.

Many Thanks! you are our hope.
I am very happy there are people like YOU who take the time to help others.
You are an idol..

IsoGroup- Web Dev/Design, WordPress and More

Affiliate Disclosure: Some links on this website are affiliate links. We make commissions for purchases made through those links.

We only recommend items/tools that we've personally used and like.

Full Disclosure | FTC Statement

Join Our Newsletter
Over 4,000 Design Lovers and Problem Solvers.


A relationship driven website creation company.


© ISOTROPIC, LLC 2016-2021
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram