私はjqueryプラグインを開発しました
$(someelment).myplugin();
完璧に動作します。
他のプラグインにエラー表示が含まれている場合
$(someelment).myplugin().otherplugin();
以下の場合も機能します。
$(someelment).otherplugin().myplugin();
私はjqueryプラグインを開発しました
$(someelment).myplugin();
完璧に動作します。
他のプラグインにエラー表示が含まれている場合
$(someelment).myplugin().otherplugin();
以下の場合も機能します。
$(someelment).otherplugin().myplugin();
通常、プラグインの連鎖性を維持するには、プラグイン関数に戻るthis(または)必要があります。this.each()それを見逃すと、別のプラグインを呼び出せなくなる可能性があります-問題だけです。これがリファレンスです。
あなたは持っている必要があります
return thisまたreturn this.each()
チェーンが正しく機能するためのプラグインのステートメント。