开发者

Applying multiple jQuery plugins

I have made two jquery plugins which both work in their own right.

If I call them using:

$('input').inputShrink();
$('input').fillForm();
开发者_运维百科

then the two effects work. However, if I do:

$('input').inputShrink().fillForm();

then only the first one is applied. It was my understanding you could do this, is there something in my plugins I need to set up?


Quote from the jQuery docs : LINK

Maintain chainability in a plugin, you must make sure your plugin returns the thiskeyword.

In short - remember to return the jQuery object in your plugin.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜