How to use jQuery in Magento aka jQuery Compatible Mode
Bringing jQuery plugins to Magento

Instead of:
$(document).ready(function(){
$("div").hide();
});
you need to write your code this way:var $j = jQuery.noConflict();
$j(document).ready(function(){
$j("div").hide();
});
So as you noted the difference is adding: var $j = jQuery.noConflict();and using $j instead of $.
You can read more on this subject here: Using jQuery with Other Libraries
Comments