开发者

wordpress adds <br/> tag after image uploaded

开发者 https://www.devze.com 2023-03-28 11:44 出处:网络
I\'m tryng to build a slide-sho开发者_如何学编程w in my wordpress blog.I\'m using jqTransitions plugin but I have an issue.

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!

wordpress adds <br/> tag after image uploaded

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();

0

精彩评论

暂无评论...
验证码 换一张
取 消