I am trying to show some span`s with data attribute base on select options available.
I am using the below code
$("#pa_varsta option").each(function(i){
var marime = $(this).val();
$('.tawcvs-swatches [data-value=' + marime + ']').show();
});
But i get the error
jquery.js?ver=1.12.4:2 Uncaught Error: Syntax error, unrecognized expression: .tawcvs-swatches [data-value=]
I am using Wordpress.
Any ideea, maybe regarding the jquery version?
$('.tawcvs-swatches [data-value="'+marime+'"]').show();