change Active TAB behaviour wordpress


I have 3 tabs that work correctly on desktop and on mobile as well.

Problem comes when users go to site on his mobile device and he sees this:

problem here is that user has to scroll down all the way down thru 20 pics untill see the other 2 tabs. So, what he wants is the follow:

So i tried to find the code where i can remove the ACTIVE class of the tab:


…but WordPress is a bit complicated and although i searched thru all the plugins and themes editor and all possible files, i did not find it.

So i thought of using jQuery to remove that class. So i did the following; i created this script on a js file and put it on the themes root (wp-content/themes/Avada/jsAle):

  jQuery(document).ready(function($) {

…and added the function on FUNCTIONS.PHP file:

function my_theme_scripts() {
wp_enqueue_script( 'borrar-script', get_template_directory_uri() . '/jsAle/jAle.js', array( 'jquery' ), '1.0.0', true ); 
add_action( 'wp_enqueue_scripts', 'my_theme_scripts' );

BUT still nothing happens, the tab is still active , i wonder if i am doing something wrong with the function or if the path is bad referenced for the js file created.

Does anybody knows if i can modify the DOM directly to removed the active class manually?

thanks in advanced.

Read more here: change Active TAB behaviour wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *