jQuery warnings
jQuery warnings
I just discovered JQuery yesterday so I still learning. I went to
http://www.malsup.com/jquery/cycle/int2.html for examples. The code
is generating a lot of warnings in FireFox's Error Console and
eventually locks up Firefox.
My implementation using version 1.2.6 generates similar volumes of
errors
My code
<div id="maincontent" style="height:400px">
<div id="s1">
<img src="<?php echo $Path;?>/SiteAssets/Jpeg/dressA.jpg"
alt="eat your peas lenox" width="50%" border="0" class="image" />
<img src="<?php echo $Path;?>/SiteAssets/Jpeg/pantsA.jpg"
alt="eat your peas lenox" width="50%" border="0" class="image" />
<img src="<?php echo $Path;?>/SiteAssets/Jpeg/suitcaseA.jpg"
alt="eat your peas lenox" width="50%" border="0" class="image" />
<img src="<?php echo $Path;?>/SiteAssets/Jpeg/suitcaseB.jpg"
alt="eat your peas lenox" width="50%" border="0" class="image" />
</div>
<script language="JavaScript1.2" type="text/javascript">
$('#s1').cycle({
fx: 'fade',
speed: 5000,
timeout: 3000,
next: '#s1',
pause: 1
});
</script>
<!-- close div -->
</div>
The code works beautifully except for the following warnings
line 1163 of jquery-1.2.6.js test for equality (==) mistyped as
assignment (=)
while ( elem = second[ i++ ] )
line 1168 of jquery-1.2.6.js test for equality (==_ mistyped as
assignement (=)
while ( elem= second[i++ ] )
line 1861 anonymous function does not always return a value
));
line 3526 anonymous function does not always return a value
this[0][ method ];
line 1827 reference to undefined property elem.nodeType
line 679 referrence to undefined property jQuery.cache[id][name]
line 313 variable s hides argument
var s = parseInt(s).toString(16);
line 3007 reference to undefined property optall.queue
line 233 reference to undefined property $.fn.cycle[opts.fx]
line 3158 reference to undefined property opt.queue
I changed line 1040 from
if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
to
if(!elem)
since elem.nodeType is an undefined attribute
I haven't read and comprehended all of the code but was curious if the
warnings are typical or if the problem is my implementation? All of
the above warnings are generated each time the code cycles from one
picture to the next.
Thanks for you help.