I wrote some code to toggle the src of an image and also to pause/resume the jQuery cycle2 plugin.
I\'m not sure why it isn\'t working and would appreciate some help
Try something like this...
$('#toggle').attr('src',
$(this).data('inactive')
);
$('#toggle').attr('src',
$(this).data('active')
);
And you'll need data-inactive="example.com/inactive.jpg"
and data-active="example.com/active.jpg"
added to your image. By storing both as "data" you won't need any extra code to swap the URLs.