tarafından göstermek/gizlemek div, ben şöyle kağıt onay kutusu, bir div/gizlemek için JQuery kullanmak:Polimer - Bir meteor kökenli geliyor kağıt onay kutusunun
HTML:
<paper-checkbox name="remoteLocation" id="remote-chk" checked>Remote Location</paper-checkbox>
<div id="autoUpdate" class="autoUpdate" style="display: none;">content</div>
Senaryo: Artık
Template.<templateName>.events({
'change #remote-chk' : function(e){
if (e.target.checked) {
$('#autoUpdate').fadeOut('slow');
} else {
$('#autoUpdate').fadeIn('slow');
}
}
)};
, Polymer 1.0, ben de aynı şeyi uygulamak çalışıyorum: hiçbir şey işe olarak
<link rel="import" href="/bower_components/paper-checkbox/paper-checkbox.html">
<dom-module id="my-app">
<template>
<paper-checkbox name="remoteLocation" id="remote-chk" on-click="showMe" checked>Remote Location</paper-checkbox>
<div id="autoUpdate" class="autoUpdate" style="display: none;">content</div>
</template>
<script>
Polymer({
is: "my-app",
showMe: function() {
if (e.target.checked) {
$('#autoUpdate').fadeOut('slow');
} else {
$('#autoUpdate').fadeIn('slow');
}
}
});
</script>
</dom-module>
birisi, ikinci bir göz, lütfen ayırabilir misiniz? Teşekkürler.