【发布时间】:2016-05-27 05:04:23
【问题描述】:
我在我的 wordpress 主题中使用 nivo 滑块 jQuery 插件(没错,我使用的是 jQuery 插件而不是 WordPress 插件),无论出于何种原因,图像转换都是可怕的。
例如,它们缓慢且不稳定,您会看到过渡效果,直到图像再次发生变化。这就是我的意思:
这是我的 jQuery 代码
jQuery(document).ready(function() {
var logo_width = jQuery('.logo a img').width();
jQuery('.logo').width(logo_width);
jQuery('#cycler').nivoSlider({
effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
slices: 15, // For slice animations
boxCols: 6, // For box animations
boxRows: 2, // For box animations
animSpeed: 500, // Slide transition speed
pauseTime: 3000, // How long each slide will show
startSlide: 0, // Set starting Slide (0 index)
directionNav: true, // Next & Prev navigation
controlNav: true, // 1,2,3... navigation
controlNavThumbs: false, // Use thumbnails for Control Nav
manualAdvance: false, // Force manual transitions
prevText: 'Prev', // Prev directionNav text
nextText: 'Next', // Next directionNav text
randomStart: false, // Start on a random slide
});
});
【问题讨论】:
-
你能发布你的 HTML,你有任何 JavaScript 错误吗?仅使用 jQuery('#cycler').nivoSlider();你有奇怪的过渡吗?
标签: jquery wordpress nivo-slider