Flexslider导航位置

Flexslider导航位置

本文介绍了Flexslider导航位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以将flexslider导航(为directionNav: true)导航到特定的<div>?现在,没有选项如何控制导航的位置.它总是出现在

Is there any option how to get flexslider navigation (it is directionNav: true) to specific <div> ? Now, there is no option how to control, where the navigation appears. It appears always inside

<div class="flexslider">

我想将其放置在

<div class="flexslider">

推荐答案

插件中没有此类选项.但是,您可以尝试实现的方法.使用css/javascript设置.flex-prev.flex-nextdisplay:none.现在,您可以在任意位置添加自定义导航处理程序.假设您有.next.prev作为自定义处理程序.现在使用jquery/javascript,您可以将click事件绑定到它们,从而将click事件触发到实际的.flex-prev.flex-next来完成您想要的操作.您的jsfiddle无法正常工作,如果您身边有可以正常工作的jsfiddle,那就更好了.

There is no such option in the plugin.But there is way for what you are trying to achieve.Using css/javascript set the display:none of .flex-prev and .flex-next . Now add your custom navigation handler wherever you want.Let's say you have .next and .prev as your custom handlers.now using jquery/javascript you can bind click events to them which in turn will trigger click events to the actual .flex-prev and .flex-next to accomplish what you want to do. Your jsfiddle doesn't work, it would have been better if there was a working jsfiddle from your side.

演示: http://jsfiddle.net/lotusgodkk/GCu2D/85/

Javascript:

Javascript:

$('.flexslider').flexslider({
    animation: "slide"
});
$(document).on('click','.next',function(){
    $('.flex-direction-nav .flex-next:first').trigger('click');
    return false;
});
$(document).on('click','.prev',function(){
    $('.flex-direction-nav .flex-prev:first').trigger('click');
    return false;
});

这篇关于Flexslider导航位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 02:00