As entitled, I am getting this error on my small site. I've checked with the IE8 developer debugging tool, and that i have the next code that triggered the mistake.

<!-- slider js code start -->
<script type="text/javascript">
$().ready(function() {
    if(eval(document.getElementById('coda-slider-1')))
    {
        $('#coda-slider-1').codaSlider();
        //jQuery.noConflict(); var $j = jQuery;
    }
}); 

I've incorporated the screenshoot from Chrome debugging tool.

http://img857.imageshack.us/i/javaerror.jpg

http://img204.imageshack.us/i/javaerror2.jpg

Help me to decipher it.

Thanks.

Do this rather:

$(function() {
    if($('#coda-slider-1').size())
    {
        $('#coda-slider-1').codaSlider();
        //jQuery.noConflict(); var $j = jQuery;
    }
}); 

Your original code states "choose nothing with jQuery, and apply this ready handler into it.Inch The right lengthy-hands syntax could be:

$(document).ready(function() { ...

Also observe that I've removed eval since it should not, be used, unless of course it cannot often be prevented.

UPDATE

Searching at the error screenshots, it seems that jQuery isn't defined (a minimum of avoid the $ alias. Perhaps you have incorporated the script in your page? If that's the case, are you currently calling jQuery.noConflict() before your ready handler is bound?

Try putting this script tag above both code you published, and also the script tag for that coda slider:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>

UPDATE 2

As stated by kingjiv within the comments below, I had been mistaken, and $().ready works (though it's not suggested). In my opinion my first update, observing that jQuery seems to not be defined, may be the actual problem here.

I am speculating you are attempting to look for the presence of coda-slider-1?

You don't need to use eval, and when you are using jquery, might as well choose the element with jquery:

if($("#coda-slider-1").length>0){

}

Problems:

  • $().ready is not suggested. Use $(document).ready(function or simple $(function.

  • Why using document.getElementById if jQuery already research elements using selectors inside a crossbrowser way? Simply do $("#some").length to find out if it is available.

  • Also inside your situation I believe is nice to be sure that the codaSlider() method is loaded before calling.

Correted code:

$(function() {
    if ($("#coda-slider-1").length > 0 && $("#coda-slider-1").codaSlider) {
        $('#coda-slider-1').codaSlider();
    }
});