用div
单击.mynote
时如何显示类input
的{{1}}元素?我尝试了以下代码,但不起作用。
id=title
$("#title").click(function() {
$(".mynote").show();
});
答案 0 :(得分:1)
var arr =[]; //declared globally
async function myloop(){
for(i=0;i<10;i++){
arr.push(i);
}
}
// Here is what I wanna do now
myloop().then(function(){
for(i=10;i<20;i++){
arr.push(i)
}
})
答案 1 :(得分:0)
<table class="tall-table">
<tbody>
<tr>
<td class="tall-data">
<div class="tall-note">
<div class="mynote" style="display:none">
some text here
</div>
</div>
</td>
</tr>
<tr class="tall-data">
<td class="tall-label">
text ...
</td>
</tr>
<tr>
<td class="tall-data">
<input name="title" id="title">
</td>
</tr>
<tr class="tall-data">
<td class="tall-label">
text ...
</td>
</tr>
</tbody>
</table>
<script>
$(document).ready(function(){
$("#title").click(function() {
$( ".mynote" ).show();
});
});
</script>