What real purpose does $.noop() serve in jQuery 1.4?

前端 未结 9 737
故里飘歌
故里飘歌 2020-12-30 19:01

Pouring over the release notes regarding jQuery 1.4, I came acrosss $.noop() which is:

Description: An empty function. (added in 1.4)

9条回答
  •  离开以前
    2020-12-30 19:16

    Probably if some bad API requires a function as a parameter, and you don't want to do anything in it, this would be a framework-supported way of making that obvious.

提交回复
热议问题