Custom JavaScript function not being called -
i have written custom function image slider not called
following code.
carousel: { init: function() { // main function run } previous: function() { // function run when want go }, next: function() { // function run when want go forward } }
and calling onclick=javascript:previous()
following error on console :
previous() not defined
if carousel
top level of object.
you need call function previous referring property of object:
onclick=carousel.previous()
Comments
Post a Comment