我无法使用 Image Picker gem 取消选择 Rails 中的选项。选择功能工作正常。使用 jQuery 在“选择”上调用 .imagepicker。我需要能够取消选择一个选项。任何的意见都将会有帮助。
这是jQuery。
$(document).ready(function(){
$("select:not(#countertop_countertype_id)").val('').imagepicker({
show_label: true,
clicked:function(){
console.log($(this).find("option[value='" + $(this).val() + "']").data('img-src'));
}
});
});