我使用 flexslider 滑动一些内容: http: //iea.uili.com.br/v4/ 问题是我想在放大时禁用触摸并在缩小时启用返回,键盘控制也是如此!
这是我单击任何建筑物放大时的功能
function janelas(){
$('.popup').click(function() {
var $id = $(this).attr('class').split(' ')[2];
$('.menu_janela').fadeOut('fast');
$("ul.flex-direction-nav").addClass('hide');
setTimeout(function(){
console.log('.'+$id+'-popup')
$('.'+$id+'-popup').fadeIn('fast');
},600);
});
}
这是缩小时的功能
function fecha(){
$('.fechaa').click(function() {
$("ul.flex-direction-nav").removeClass('hide');
$('.menu_janela').fadeOut();
$('.view1').click();
});
$('.fechab').click(function() {
$("ul.flex-direction-nav").removeClass('hide');
$('.menu_janela').fadeOut();
$('.view2').click();
});
$('.fechac').click(function() {
$("ul.flex-direction-nav").removeClass('hide');
$('.menu_janela').fadeOut();
$('.view3').click();
});
$('.zoomContainer').click(function() {
$("ul.flex-direction-nav").removeClass('hide');
$('.menu_janela').fadeOut();
});
}
这是滑块的功能
function Slider(){
$captions = $('.captions');
$('.flexslider').flexslider({
animation: "slide",
slideshow: false,
animationSpeed: 1500,
controlNav: false,
keyboard: true,
touch: true,
start: function(slider) {
$activecaption = $('.flex-active-slide .flex-caption');
$captions.html($activecaption.text());
$('.loading-container').fadeOut(function() {
$(this).remove();
});
$('.centro').centro();
janelas();
fecha();
},
before: function(slide) {
},
after: function(slide) {
$activecaption = $('.flex-active-slide .flex-caption');
$captions.html($activecaption.text());
},
end: function(slide) {
},
});
}