Мне нужно вызвать метод плагина jQuery из другой функции jQuery. Я использую ASP.NET MVC5, и я собираю свои файлы jQuery в нем, но по какой-то причине не работает.
$(document).ready(function () {
$(this).greenify();
})
(function ($) {
$.fn.greenify = function () {
alert("Hello it works");
};
})(jQuery);
bundles.Add(new ScriptBundle("~/bundles/CustomScripts").Include(
"~/Scripts/Custom_Scripts/mainCustomScript.js"
));
@Scripts.Render("~/bundles/CustomScripts")
ответ
bundles.Add(new ScriptBundle("~/bundles/CustomScripts").Include(
"~/Scripts/Custom_Scripts/DashboardGUI.js",
"~/Scripts/Custom_Scripts/mainCustomScript.js"
));