Here is my code:
(function($){
$.fn.pluginbutton = function (options) {
myoptions = $.extend({ left: true });
return this.each(function (
When converting an ASP.Net webform prototype to a MVC site I got these errors:
TypeError: $(...).accordion is not a function
$("#accordion").accordion(
$('#dialog').dialog({
TypeError: $(...).dialog is not a function
It worked fine in the webforms. The problem/solution was this line in the _Layout.cshtml
@Scripts.Render("~/bundles/jquery")
Comment it out to see if the errors go away. Then fix it in the BundlesConfig:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));