Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert jQuery code in Avada theme?

I want to insert a simple jQuery code in my Wordpress theme (Avada), something like this:

$(function() {
    $("#tabs").tabs({ show: { effect: "blind", direction: "right", duration:300 }});
    $( "#accordion" ).accordion();

    var btn = $('#accordion li a');
    var wrapper = $('#accordion li');

    $(btn).on('click', function() {
        $(btn).removeClass('active');
        $(btn).parent().find('.addon').removeClass('fadein');

        $(this).addClass('active');
        $(this).parent().find('.addon').addClass('fadein');
    });
});

In a page, but it doesn't work.

I tried to use different classes to all the HTML elements and to insert my code with a plugin named "CSS & Javascript Tool box", but it didn't helped.

like image 784
sahnas Avatar asked May 17 '16 09:05

sahnas


People also ask

How do I put codes into avada?

To add your Google AdWords Conversion Tracking Code, navigate to Avada > Theme Options > Advanced > Code Fields (Tracking etc.), and insert the code in the Tracking Code field. Place the code inside of < script > tags. Below is an example code snippet added to the Theme Options.

Does avada use jQuery?

At our end, it appears Avada 6.2. 1 is using jQuery 1.4.

Is avada compatible with WordPress?

Yes, of course, Avada will work perfectly with the 4.9. 8 version of WordPress. You can delay updating to WordPress 5.0 if you have accessibility concerns or are simply not ready to do so at this time.


1 Answers

You are using Avada theme, go to theme options->Advance->Code Fields (Tracking etc.), you will see three text boxes you need to add your code in the second box (Space before ). Place code inside tags. I am attaching the screenshot.enter image description here

like image 145
Deepti chipdey Avatar answered Sep 20 '22 22:09

Deepti chipdey