如果$(this)
的特定实例等于条件中的特定值,我如何使用$('select').data('field')
重用if ($('select').data('field') === "DriverDiscovery.AddStatus") {
alert( $(this) );
}
的特定实例。
// obtain tasks names
List<String> runTasks = gradle.startParameter.getTaskNames();
for (String item : runTasks)
// increment only version on task which contains word assemble & Release
if (item.contains('assemble') && item.contains('Release')) {
value = 1; // <- u can use here "item.mustRunAfter clean"
}
由于
答案 0 :(得分:0)
这个怎么样:
$('select').each(function(){//for each select element
if($(this).data('field') == "DriverDiscovery.AddStatus"){//if the condition is met
alert($(this).text());//print its text
}
})