Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to disable the lightSlider function #5

Closed
rajagh opened this issue Oct 20, 2014 · 2 comments
Closed

Not able to disable the lightSlider function #5

rajagh opened this issue Oct 20, 2014 · 2 comments

Comments

@rajagh
Copy link

rajagh commented Oct 20, 2014

Hi,
I'm initialization the function on true condition on select drop down, but not able to destroy the same on else condition.

pls help me.

@w00fz
Copy link
Member

w00fz commented Oct 20, 2014

I'm not sure I understand what you are trying to do, mind sharing some code?

@rajagh
Copy link
Author

rajagh commented Oct 21, 2014

I'm calling below function on select dropdown/onchange on ture condition lightSlider get initialized and other hand it's destroy/ de-initialized on else condition.
/////////////////////////////////////////////////////////////
var galleryPangination = function (id){

//$(id).lightSlider().init();
var galleryLenght = $(id).find('li').length;
console.log("galleryLenght "+ galleryLenght);
if(galleryLenght > 3){

$(".lSAction").css("display","block");
alert("pp")
var slidbar = $(id).lightSlider({
onBeforeStart: function() { alert("before");  },
mode:"slide",
pager: false,
 rtl:false,

item:3,
slideMove:1,
controls:false,
'prevnext': true,

vThumbWidth: 300,
currentPagerPosition : 'middle',
preload : 1,
speed : 600,
hideControlOnEnd: true,
responsive :[],
freeMove: false,
swipeThreshold:40,
enableTouch:false,
enableDrag:false,
freeMove:false,
swipeThreshold: 40,
auto: false,
loop: false,

});
$('.lSPrev').click(function(){
slidbar.goToPrevSlide();

               });

$('#lSNext').click(function(){
slidbar.goToNextSlide();

               });


}else{

    $(".lSAction").css("display","none");
      slidbar.goToSlide(1);
    //$(id).destroy();

     }

}

@rajagh rajagh closed this as completed Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants