<a href="#"
onclick="
jQuery.ajax({'url':'<?php echo $this->createUrl('next',array('reference'=>''))
?>'+jQuery('.mainBody .galleryImage .image img').attr('src'),
'cache':false,
'success':function(html){
jQuery('.mainBody').html(html)}
});
return false;"
class="galleryNext">Next</a>
The key issue being that the response is based on a value being returned by jQuery('.mainBody .galleryImage .image img').attr('src'). This value is not static so it must be read when the link is clicked.
I have tried a few different variations but it always appears that the "calculated" url gets encoded.
Thoughts welcome
nz