
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Tracy,
Try it like this.
jQuery("select[name='wpv-event-categories'] option[value='performances']").attr('disabled','disabled')
This should work now as i've managed to test it on the frontend.
Thanks,
Shane
Many thanks,
It's not working I'm afraid.
Does it need a ; at the end?
Does it need " instead of ' for the bits here.... name='wpv-event-categories'] option[value='performances']
Thanks again.

Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Tracy,
Not sure what you mean by the code isn't working. When I checked the value on the frontend the item is disabled. See Screenshot
As you can see Performances is greyed out a bit, which means it's not selectable.
The code format that I provided is actually correct. Its good practice to use the ; at the end of line, however given that this is Javascript its not required.
Thanks,
Shane
Hi Sean, 'performances' and a few other items need to be completely removed from the list not just disabled, apologies if I wasn't clear in my description of what I needed. I googled it and found the remove option and the following work now...
jQuery("select[name='wpv-event-categories'] option[value='performances']").remove();
jQuery("select[name='wpv-event-categories'] option[value='theatre-booking']").remove();
Thanks again for all your help, much apprecaited!

Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Tracy,
Happy to see that its all sorted now.
If there are no further issues then you can go ahead and mark this issue as resolved.
Thanks,
Shane
My issue is resolved now. Thank you!