开发者

Hide/Show Values Inside TD tags

How can I hide or show the value containe开发者_如何学God inside a TD tag?

E.g:

<td id="dateCell<%= i %>">
<%= Html.Encode(row.ActionOn.HasValue ? Html.FormatDateTime(row.ActionOn.Value) : Html.Encode("")) %>
</td>

How can I get the encoded value and hide or show it depending on a condition?


$('#myDropDown').change(function() {
if($(this).val() == 4) {
    $('#dateCell').hide();
} else if($(this).val() == 3) {
    $('#dateCell').show();
}

});

although this will hide the entire td, which isn't necessarily a good practice

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜