I'm using the jquery Galleriffic plugin, here is part of the code that is generated by the script :
<div id="slideshow" class="slideshow">
<span class="image-wrapper current" style="opacity: 1; ">
<a class="advance-link" rel="history" href="#2" title="Title #0">
<img alt="Title #0" src="images/products/Classic.jpg"></a></span></div>
This space before the img tag is causing the image to display in the wrong place, I dont know why the script generates such space, but I thought I should remove the space instead.
I tried the following code, but it didnt work.
$('a.advance-link').text( $('a.advance-link').text().replace(/\s+/g, "") );
I also tried this one
$('a.advance-link:contains(" ")').html(function(i, h) {
return h.replace(/\s+/g, '');
});
but no luck, can somebody figure out how would i remove it ?
Thanks
Took a look at the plugin.
You'll notice that it first constructs the string you're talking about, then it appends the imageData into the anchor. The result is that the
tag is never replaced. You could try simply changing that.append(imageData.image)
to.html(imageData.image)
and seeing if that doesn't fix your issue.