I'm tryng to build a slide-sho开发者_如何学编程w in my wordpress blog.I'm using jqTransitions plugin but I have an issue.
This plugin requires that you have a div
(id=slide-show) with all of the images you want to show inside.
<script>
//SLIDE-SHOW GALLERY
$(document).ready(function(){
$('#slide-show').jqFancyTransitions();
});
</script>
//and images inside slide-show div
<div id="slide-show" >
<img src="images/gallery/1.jpg" alt="RAN" title="My title">
<img src="images/gallery/2.jpg" alt="AJISAI" title="Another title">
<img src="images/gallery/3.jpg" alt="HIMAWARI" title="My title">
</div>
Everything works perfectly outside of wordpress. The point is when I add the slide-show div
in a wordpress page, it automatically adds a <br />
after each image, so that she images are sliding not aligned!
How can I prevent wordpress to add br
tag right after each image?
SOLVED:
WORDPRESS was actually considering the newline between each image tag as a br tag.Have to write evertyhting on the same line.
WORDPRESS was actually considering the newline between each image tag as a br tag.Have to write evertyhting on the same line.
You can also remove it with this code:
jQuery('.zoomthumbnail-image').next('br').remove();
精彩评论