plugin של jquery שאמור לקבל את jquery כפרמטר

24sharon

New member
plugin של jquery שאמור לקבל את jquery כפרמטר

יצרתי איזשהו פלאגין אך בשביל שהוא יהיה מוטמע הוא צריך פרמטר JQUERY
לכן עטפתי בפונצקיה

כך זה נראה - אשמח לשמוע אם זו הדרך המקצועית לבצע את הדרישה הזו.
//the base functionfunction CustomBar(jq) {
(function ($) {
$.extend({ bar_api: function (options) { var obj = this; var defaults = { position: "top", background_color_from: '#f0611f', } var options = $.extend(defaults, options); ApplyBar(); } }); })(jq);}//the call CustomBar(jq); //jquery object jq.bar_api({ position: "top", //top or bottom });
 
למעלה