I am using prototype and jquery, and as noted on many sites, there is some potential for conflicts. Now, I saw as well again and again this solution:
Now, I have another, quite long javascript file which is being included and references jquery. There are lots of "$" refrences, such as "function($ )", "$this.css" , "$(_tagMain).da ta"...
Do I need to replace then all of the "$" with "$j"? Or could it be that I will then badly reference some of these calls/methods?
Code:
<html>
<head>
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
var $j = jQuery.noConflict();
// Use jQuery via $j(...)
$j(document).ready(function(){
$j("div").hide();
});
// Use Prototype with $(...), etc.
$('someid').hide();
</script>
</head>
<body></body>
</html>
Do I need to replace then all of the "$" with "$j"? Or could it be that I will then badly reference some of these calls/methods?
Comment