开发者

best practice: should i unbind on custom widget

开发者 https://www.devze.com 2023-02-12 02:32 出处:网络
i create custom multiple span element and 开发者_C百科bind with with click event.i want to dynamically remove the span on click. i can just remove the span with remove() function. for good practice, s

i create custom multiple span element and 开发者_C百科bind with with click event. i want to dynamically remove the span on click. i can just remove the span with remove() function. for good practice, should i call unbind on the span first before call remove() ? please advice


According to jQuery, calling remove will automatically unbind the click event. So you should be okay.

0

精彩评论

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

关注公众号