How would I access every option of a select except the one that is selected?
I am trying, but with no success:
$('select[id^="buyingSupplierRef"]').live('mouseleave', function()
{
$(this+' option:not(option:selected)').each(function(){
$(this).detach() ;
})
Try the following:
Note that
live()is deprecated, you can useon()instead.