Custom jQuery code in Elementor page is not working on Mac os. On Windows browser work fine.
I make small jQuery script for tabs and put in Elementor page. On all Windows browsers is working fine, but on Mac os Safari and Crome is not working.
So on Mac i get error "jQuery is not defined"
I hope that someone can help me.
This is my code
jQuery(document).ready(function($) {
$('.tab-item').click(function() {
var tabId = $(this).attr('data-tab');
// remove active class from all tabs and contents
$('.tab-item, .tab-content').removeClass('active');
// add active class to the clicked tab and its content
$(this).addClass('active');
$("#" + tabId).addClass('active');
});
});
wp_enqueue_script( 'jQuery' )
but you need to declare it as a dependency of your script or WP won't know the correct order to print them out, and it'll be the luck of the draw as to wether it loads before or after your script breaking things