This didn’t happen until I have added jQuery.
function mfunc() {}
mfunc.prototype.create = function(value) {
alert("hi");
}
Script before the closing body tag:
$(document).ready(function(){
var mfunc = new mfunc();
alert("hi");
alert(mfunc.create("hello"));
});
I get the following error in firebug:
mfunc.create is not a function
Thanks in advance.
You are shadowing your prototype function! Your original function is called
mfunc, but then you are using that same variable name to refer to a new instance. Use a different variable name: