need help with my transferring code from mootools to jquery
Hi there,
i'm in to port my old mootools script into the newer and faster jquery.
In the past, i use a oop notation and classes. Now, jquery use another notation, and here is my problem:
I have a class that i called and instantiate ...:
-
var fValidate = new formValidate('.check');
$('btnSubmit').addEvent('click',function() {
fValidate.checkFormFields('.check');
return false;
});
The same in jquery:
-
$('.check').formValidate();
$('btnSubmit').click(function() {
checkFormFields('.check');
return false;
});
.. and i become an error:"checkFormFields is not defined" but the function "displayWrapper" already exist in my jquery.plugin, what am i doing wrong?
I have understood, that the jquery "plugins" are "only" a collection of functions is, right/wrong?
I hope anybody can help me with this problem.
cheers