I have been doing a lot of JavaScript recently, a language which is not as forgiving as PHP.
I was trying to pass what I thought was an integer to a function that only accepted integers.
[js]
$(‘#slideshow’).cycle(slideId);
[/js]
slideId had been defined in a tag and retrieved by using the following.
[js]
var slideId = $(this).attr(‘page’);
[/js]
slideId only contained a number but still cycle() throw an error. You cant seem to define a var as int instead the following code fixed the issue.
[js]
var slideId = $(this).attr(‘page’);
$(‘#slideshow’).cycle(parseInt(slideId));
[/js]