Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var flag=0;
- jssor_1_slider_init = function() {
- var jssor_1_options = {
- $AutoPlay: 0,
- $DragOrientation: 2,
- $PlayOrientation: 2,
- $FillMode: 2,
- $Loop: 0,
- $SlideWidth: 375,
- $BulletNavigatorOptions: {
- $Class: $JssorBulletNavigator$,
- $Orientation: 2
- }
- };
- var jssor_1_slider = new $JssorSlider$("jssor_1", jssor_1_options);
- //////////////////////trying to get append next slide/////////////////////////////
- function DisplayIndex(position, virtualPosition) {
- console.log("---------------");
- if(flag==0){
- flag=1;
- previous_position = parseInt(virtualPosition)+1;
- }
- else {
- var total_slides = jssor_1_slider.$SlidesCount();
- var current_slide = parseInt(virtualPosition)+1;
- if(previous_position==current_slide){
- console.log("do nothing");
- }
- if(previous_position>current_slide){
- console.log("previous");
- }
- if(previous_position<current_slide){
- console.log("next");
- var slidesHtml='<div><img data-u="image" src="img/010.jpg" /></div>';
- jssor_1_slider.$AppendSlides(slidesHtml, total_slides);
- jssor_1_slider.$GoTo(position);
- }
- previous_position = current_slide;
- }
- }
- jssor_1_slider.$On($JssorSlider$.$EVT_SWIPE_END, DisplayIndex);//$EVT_DRAG_END
- //////////////////////trying to get append next slide ends/////////////////////////////
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement