I have a javascript there is looking like this:
jQuery("ul[data-attribute_name=attribute_pa_afhentning-og-levering] li").click(function(){
var selectedlevering = jQuery("ul[data-attribute_name=attribute_pa_afhentning-og-levering]").find("li.selected").attr("data-value");
if (selectedlevering == "afhentning"){
jQuery("ul[data-attribute_name=attribute_pa_packages] li[data-value=afhentning] span").click();
jQuery("ul[data-attribute_name=attribute_pa_packages] li[data-value=afhentning]").hide(); // hide the "afhentning" option in "Packages" if you like
}
});
I need to call that script from my functions.php in Wordpress. But how am I doing that?
Best regards