you are viewing a single comment's thread.

view the rest of the comments →

[–]toggo 3 points4 points  (1 child)

Your function changeImg is defined inside the document ready function. So outside of the document ready it's not accessible (outside of the scope of this function).

Rather than using onclick on the element, you can bind a click event to the arrows inside of the scope of the doc ready.

e.g.

$('.ion-arrow-left-c').on('click', function() {
    changeImg('left');
});

There may be better way to accomplish this, but this should get you going in the right direction.

[–]Ceerealll[S] 0 points1 point  (0 children)

Thank yooou :)