How to use jQuery in custom JS

Hi,
I’m new to x theme corberstone and trying to use custom JS. But don’t how to use jQuery in custom JS, my codes don’t seem to work. Must I enable it first?
Thx for helping!

Hi There,

You can add your jQuery code directly to the custom JS without the script tag.

for example:

jQuery(document).ready(function(){

   // jQuery methods go here...

});

And if you want to add custom javascript file you can use child theme function file to enqueue it.

Please check this for help https://developer.wordpress.org/themes/basics/including-css-javascript/

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.