I have a question that might seem silly at first glance. Itβs hard for me to figure it out, and whenever I use it, nothing happens. I have a jQuery plugin written by me that looks like this:
(function(){ $.fn.myPlugin = function(options){ var options = $.extend({ firstParameter : null; }
But when I call it from an HTML file, for example: ("#object").myPlugin(2); It does not work (pay attention to the parameter that I passed). But if I skip the argument and name it like this: ("#object").myPlugin(); it all works. What is the problem?
Thank you in advance
user2373802
source share