我有以下代码:
<td class="select-cli-numbers"><div class="explanationText" style="cursor:pointer;">Click here to select numbers</div></td>
切换时,我想显示为 Click here to hide CLI numbers
我的js如下,但不起作用。有任何想法吗?
$(".select-cli-numbers").toggle(function () {
$('#cli-numbers').show();
$(this).text() = "Click here to hide CLI numbers"
}, function () {
$('#cli-numbers').hide();
$(this).text() = "Click here to show CLI numbers"
});