I can confirm that Safari ignores display: none
on option
elements.
Your best bet is probably to disable the options rather than hiding them:
$(".product_names").val("").find("option").prop("disabled", true);
If you really want them hidden, you'll need to remove them. You can always put them back if you want to later:
var options = $(".product_names").find("option").detach();
to add them back:
options.appendTo(".product_names");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…