Did some of you know something about MooTools of Prototype frameworks ?
jQuery is simply extending the native javascript functionalities.
I could say, do it in javascript !
But in our days, nobody is coding in JS without framework.
The basics :
var object = $('my_html_ID');
or
var object = jQuery('my_html_ID'); //for cross compatibility
Because '$' is a FUNCTION, very important to understand. And this function has been defined both in MooTools AND jQuery. So the conflict comes from that. Ok ?
If you are coding a long script, you may use the trick to be able to use the '$' function without problems. I show you and explain :
(function ($) {
// your code here
})(jQuery)
I explain :
'jQuery' function = '$' function
so, your call is inside a function receiving a parameter, the framework (jQuery function)
The source is the same than:
var mySource = function($)
{
// Here the $ is a local var (no conflicts)
// Note in this case, the $ var is a function (jQuery framework)
};
//Here the code is called
mySource(jQuery); //No conflict, with the '$' function of MooTools
When you call only one line command, you still can use 'jQuery' instead of '$'
Well, if you understand this, you start with a good basis, and your code will always be compatible.
I cannot explain all jQuery here, but you will see, it is easy. Search for tutorials.
Because, it depends what you want to do...