0

this jquery code is hiding the button than changing the text?

$(document).ready(function() {
    $('#hide_show_b').toggle(function() {
        $(this).text('show');
    },function() {
        $(this).text('hide');
    });
});
4

1 回答 1

0

toggle() is deprecated in newrs version

This method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9. jQuery also provides an animation method named .toggle() that toggles the visibility of elements. Whether the animation or the event method is fired depends on the set of arguments passed.

SEE HERE

于 2013-06-09T04:42:53.327 回答