I have created a custom jQuery plugin and having problems getting a window-sized function to fire inside the plugin I was broken down to do the basics of obtaining it, I did not know why he was not firing:
; (Function ($, window, document, undefined) {$ .fn.test = function (option) {$ (window). Reset (function () {warning ('sdsd');})}}}}}) JQuery); $ (Function () {$ ('. Element'). Test ();});
In your case the window is undefined because you can not Passing it in the function. ; (Function ($, window, document, undefined) {$ .fn.test = function (options) {$ (window). Resize (function () {warning ('sdsd');});};}) , Window, document); // & lt; --- Make changes here
No comments:
Post a Comment