Hi,
I'm pretty new to Jquery but been using mootools for quite some time now... I just wonder, how could I assign function to jquery?
In javascript, we do the regular :
- function Myclass() {
- //some code here
- }
and call the Myclass by:
In mootools:
- var Myclass = new Class({
- //some code here
- });
and call the Myclass by:
- window.addEvent("domready", function() {
- new Myclass();
- });
In Jquery, how would I do that?
Is it okay to use the javscript function instead? Or is there a standard way of doing that in jquery?
- function Myclass() {
- //some code here
- }
- $(document).ready(function() {
- Myclass();
- });
Thanks!