javascript
1(function ($) { 2 $.fn.test = function (options) { 3 //プラグイン宣言 4 options = $.extend({ 5 test: 0.6, 6 7 }, options); 8 9 10 $(window).on("load resize",function () { 11 12 this.each(function () { 13 14 //ここに処理 15 16 }); 17 }); 18 return this; 19 }; 20})(jQuery); 21
プラグイン化する際に
windowにリサイズイベントを設定してからwindowではないhtml状の要素をeach処理したいのですが
この方法だとプラグイン化する際にエラーが出てしまいエラーが出ないでプラグイン化するやり方がわかりません
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/28 15:40
2019/01/28 16:35