I think this must be easy but I am failing to make it work. I Have a this from my plugin
(function($) {
$.fn.Update = function() {
console.log("Clicked");
};
})(jQuery);
and this on the page where I want to use:
<script src="~/Scripts/my.Plugin.js">
</script>
$(function() {
$(".btnUpdate").click(function() {
//TODO: Add the function from the plugin
Update();
});
});
but I am getting ReferenceError: update is not defined and noticed that when the page load, I don't go inside the function, I only touch on the $.fn.update and move straight to the end.
Any help welcome
$().Update();.