Try to search your question here, if you can't find : Ask Any Question Now ?

Select with option styled with line-through

HomeCategory: stackoverflowSelect with option styled with line-through
Avatarpragati asked 3 months ago

I have this html code:

<select class="col-12 col-lg-6 px-0 form-control" onchange="controllaDisponibilita(this);" id="selectTaglia">
<option data-id-taglia="-1" selected="selected" class="esiste">Seleziona una taglia</option>
<option class="esiste" data-id-taglia="7">XXL</option>
<option class="" data-id-taglia="10">S</option><option class="esiste" data-id-taglia="9">M</option>

i want to strikeout text that haven’t class=”esiste”.
I have tried this

select#selectTaglia option:not(.esiste)

in the stylesheet but didn’t work.
Any suggestion?

P.s. Since this is a dynamic select, i need something that i can control simply from jquery, like add a class

1 Answers
Best Answer
AvatarJyoti answered 3 months ago
Your Answer

17 + 19 =

Popular Tags

WP Facebook Auto Publish Powered By :