修复灰色猫头鹰旋转木马
Fixing greyed-out .owl-carousel div
我正在调用AJAX获取页面(getresult.php
(。
我的索引中的IDdiv:
<div id="pagination">
<input type="hidden" name="rowcount" id="rowcount" />
</div>
我的页脚:
<script>
getresult("getresult.php");
</script>
在页脚中调用getresult的脚本:
<script>
function getresult(url) {
$.ajax({
url: url,
type: "GET",
data: {
rowcount: $("#rowcount").val()
},
success: function(data) {
$("#pagination").html(data);
},
error: function() {}
});
}
</script>
现在这是我的页面getresult:
<div class="blog-posts">
<article class="post post-medium">
<div class="row">
<div class="col-md-5">
<div class="post-image">
<div class="owl-carousel" data-plugin-options='{"items":1}'>
<div>
<div class="img-thumbnail">
<img class="img-responsive" src="./img/blog/blog-image-2.jpg" alt="">
</div>
</div>
<div>
<div class="img-thumbnail">
<img class="img-responsive" src="./img/blog/blog-image-1.jpg" alt="">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-7">
<div class="post-content">
<h2><a href="blog-post.html">Class aptent taciti sociosqu ad litora torquent</a></h2>
<p>Euismod atras vulputate iltricies etri elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla nunc dui, tristique in semper vel, congue sed ligula. Nam dolor ligula, faucibus id sodales in, auctor fringilla libero. Pellentesque pellentesque tempor tellus eget hendrerit. Morbi id aliquam ligula. Aliquam id dui sem. Proin rhoncus consequat nisl, eu ornare mauris tincidunt vitae. [...]</p>
</div>
</div>
</div>
</article>
</div>
我的问题是旋转木马类不起作用。当我移除类owl-carousel
时,我可以看到图片。我的index.php中有CSS和JS owl旋转木马<div class="owl-carousel" data-plugin-options='{"items":1}'>
变灰。
我终于找到了。
我忘了把它放在我的getresult.php 中
<script>
$(document).ready(function() {
$(".owl-carousel").owlCarousel({
navigation : false, // Show next and prev buttons
slideSpeed : 300,
paginationSpeed : 400,
singleItem:true
// "singleItem:true" is a shortcut for:
// items : 1,
// itemsDesktop : false,
// itemsDesktopSmall : false,
// itemsTablet: false,
// itemsMobile : false
});
});
</script>
相关文章:
- 猫头鹰旋转木马2罐头't使渐变动画工作
- 猫头鹰旋转木马宽度计算错误
- 猫头鹰旋转木马动画未在Chrome中应用
- 猫头鹰旋转木马:无法读取属性'visibleItems'的未定义
- 猫头鹰旋转木马2-拖动方向
- 如何在猫头鹰旋转木马中滑动所有可见项目,而不是使用上一个/下一个按钮
- 猫头鹰旋转木马需要滚动效果的导航悬停
- 如何在猫头鹰旋转木马中添加随机动画效果
- 猫头鹰旋转木马不存在
- jQuery的正确使用?猫头鹰旋转木马
- 猫头鹰旋转木马2动画不工作
- 猫头鹰旋转木马-自动高度移动问题
- 猫头鹰旋转木马2导航
- 猫头鹰旋转木马2从具有特定内容的元素接收项目索引
- 回调事件不起作用-使用猫头鹰旋转木马
- 猫头鹰旋转木马2不工作Magento
- 猫头鹰旋转木马 2 随机功能
- 知道我的物品是否是最新的 - 猫头鹰旋转木马
- 猫头鹰旋转木马不起作用,也许我链接不正确
- 猫头鹰旋转木马 V1 禁用/启用拖动