http://medfor.petersenuploads.co.uk/product.php/698/2/clear-ps-honey-jar-with-metal-screw-cap
[定価]タブをクリックして、オプションの1つを[追加]します。これにより、下の選択ボックスの値が設定されますが、変更されません。イベントは正しく発生していますが、選択したアイテムは変更されていません。
これはデータ型の問題でしょうか?
$('a.addspecific').live(
'click', function(e) {
e.preventDefault();
//console.log($(this).data('sterility'));
console.log("IN");
//Update dropdowns for JShop functionality
$('#capacity').find("option").filter(function() {
return $(this).text() == $(this).data('capacity');
}).attr('selected',true);
console.log($(this).data('capacity'));
$('#sterility').find("option").filter(function() {
return $(this).text() == $(this).data('sterility');
}).attr('selected',true);
console.log($(this).data('sterility'));
$('#labeltype').find("option").filter(function() {
return $(this).text() == $(this).data('labeltype');
}).attr('selected',true);
console.log($(this).data('labeltype'));
$('#itemspercase').find("option").filter(function() {
return $(this).text() == $(this).data('itemspercase');
}).attr('selected',true);
console.log($(this).data('itemspercase'));
console.log("OUT");
}