YUI旋转木马自定义导航
YUI Carousel custom navigation
Javascript代码
YAHOO.util.Event.onDOMReady(function (ev) {
var carousel = new YAHOO.widget.Carousel("container", {isCircular: true, numVisible:1});
console.log(carousel.set('navigation', {prev: document.getElementById('prev'), next: document.getElementById('next')}));
carousel.render();
carousel.show();
});
HTML
<div id='container'>
<a href='#' ><span id='prev'> Prev </span></a>
<a href='#' ><span id='next'> Next </span></a>
<ol>
<li><img src='history_base_files/200.jpeg' height="300" width="300" /></li>
<li><img src='history_base_files/280.jpg' height="300" width="300" /></li>
<li><img src='history_base_files/350.jpg' height="300" width="300" /></li>
<li><img src='history_base_files/370.jpg' height="300" width="300" /></li>
</ol>
</div>
控制台在设置转盘的导航属性时输出false
。在网上找不到任何好的推荐人。
如何创建yui旋转木马与自定义导航,如锚或跨度?
回答我自己的问题以报告对我有效的解决方案
HTML:
<div id='container'>
<a id='prev' href="#" class="yui-carousel-button yui-carousel-prev" role="button"><span><strong>Prev</strong></span></a>
<a id='next' href="#" class="yui-carousel-button yui-carousel-next" role="button"><span><strong>Next</strong></span></a>
<ol>
<li><a href='#'><img src='history_base_files/200.jpeg' height="300" width="300" /></a></li>
<li><img src='history_base_files/280.jpg' height="300" width="300" /></li>
<li><img src='history_base_files/350.jpg' height="300" width="300" /></li>
<li><img src='history_base_files/370.jpg' height="300" width="300" /></li>
</ol>
</div>
添加类yui转盘按钮,yui转盘prev&yui转盘旁边的自定义按钮元素解决了这个问题。
相关文章:
- 自定义导航栏切换(从下拉列表到从左侧滑动)
- 使用自定义汉堡包按钮用jQuery触发MDBootstrap侧导航
- 粘性导航-JS Waypoints在浏览器调整大小时出现自定义粘性导航问题
- 一页滚动自定义导航
- 导航到 JavaScript 中带有自定义请求标头的 URL
- 谷歌地图自定义路线到安卓导航
- 角度 UI 固定自定义导航栏
- 花式框v2:自定义按钮导航
- Jquery 在 Firefox 中的自定义对象参数(动态导航加载动态内容)
- 自定义jQuery/JavaScript滑块在我点击箭头/导航时出错
- 引导自定义 CSS 导航栏
- 具有自定义导航栏的 UIAutomation
- 如何使此自定义双导航同时响应和修复
- 将自定义屏幕导航编码为 Lightswitch HTML
- 在自定义帖子类型滑块上添加导航链接
- 自定义CSS导航下拉列表
- YUI旋转木马自定义导航
- 如何在提供自定义HTTP标头的同时使用javascript导航到网站
- 使用自定义对话框提示用户尝试使用未保存的数据进行导航
- jquery自定义控制的滚动导航