我有一个有两种变化的组件。我试图在Touch-UI中使用监听器隐藏自定义多字段内的字段(当更改变体的选择时)。每当变化的选择发生变化时,我都会调用以下函数。
function teaserOnSelect() {
var teaserTypeValue = $('#type :selected').val();
if (teaserTypeValue == "variation-1") {
console.log($("#title").parent());
$("#title").parent().hide();
}
}