Speed up your Oxygen workflow

with Hydrogen Pack

A true Oxygens Editor Enhancer
Starts from $19.99

How to start with jQuery in WordPress

This code is basic and for beginners.

Usually, you can see solutions but not how to wrap jQuery code to start writing it for WordPress or Oxygen

jQuery(document).ready(function($){
// YOur code goes here

		
});

The outer Javascript function is known as an anonymous function and jQuery is wrapped at the end, so is therefore aliased or bound to the $ selector, so in the inner function the jQuery shorthand document does not need to be aliased.

Code was taken from wpbeaches.com

Big thanks to Sridhar Katakam and Supa Mike


Version bellow was giving me error in a couple of occasions

(function($){

    $(function() {

	// Code goes here
		
    });

})(jQuery);

If you need help with custom scripts or you are not skilled enough to implement something from the tutorial?

HIRE ME

Stay up to date with latest post and updates.