Reputation: 251
I have just installed this new widget for our products called Nivo Slider,
This has been throwing an error in the windowonload and as such changed it from the default code on the download of:
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
to
<script type="text/javascript">
var windowOnload=window.onload||function(){};window.onload=function(){windowOnload(); {
$('#slider').nivoSlider();
};}
I am now getting the error of 'null' is null or not an object Line: 150 Char: 9
Any help on this as I have never really worked on javascript? Website link is www.gadgetfreakz.co.uk/tom
Regards
Upvotes: 0
Views: 190
Reputation: 10964
If you're going to use jQuery you'll probably need to put it into No Conflict mode so it doesn't interfere with Prototype (Magento uses it). Easiest thing I found is to just make a jquery-compat.js file with the line
var $j=jQuery.noConflict();
And include that file. Then you can use $j(...)
where you would normally use $(...)
Upvotes: 1