-
Notifications
You must be signed in to change notification settings - Fork 750
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
Disable Previous and Next Arrow Navigator #38
Comments
Here is workaround, function DisplayHideArrow(index) {
if (index == 0) {
//hit the first slide, display arrow right and hide arrow left
}
else if (index == jssor_slider1.$SlidesCount() - 1) {
//hit the last slide, display arrow left and hide arrow right
}
}
jssor_slider1.$On($JssorSlider$.$EVT_PARK, DisplayHideArrow); |
i use the above code this way , but it didnot work
jQuery(document).ready(function ($) {
|
The following is full code, function DisplayHideArrow(index) {
var hideLeftArrow;
var hideRightArrow;
if (index == 0) {
hideLeftArrow = true;
}
else if (index == jssor_slider1.$SlidesCount() - 1) {
hideRightArrow = true;
}
jQuery(".jssorb08l").css("visibility", hideLeftArrow ? "hidden" : "visible");
jQuery(".jssorb08r").css("visibility", hideRightArrow ? "hidden" : "visible");
}
jssor_slider1.$On($JssorSlider$.$EVT_PARK, DisplayHideArrow);
//hide arrow left at the beginning.
DisplayHideArrow(0); |
Here is my full code . Still not working and i also want to stop looping same slides again and again <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script> <script type="text/javascript" src="js/jssor.core.js"></script> <script type="text/javascript" src="js/jssor.utils.js"></script> <script type="text/javascript" src="js/jssor.slider.js"></script> <script> jQuery(document).ready(function ($) { var options = { $AutoPlay: false, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false $PlayOrientation: 2, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1 $DragOrientation: 2, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0) $ArrowNavigatorOptions: { $Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance $ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always $AutoCenter: 1, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0 $Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1 } }; var jssor_slider1 = new $JssorSlider$("slider1_container", options); function DisplayHideArrow(index) { var hideLeftArrow; var hideRightArrow; if (index == 0) { hideLeftArrow = true; } else if (index == jssor_slider1.$SlidesCount() - 1) { hideRightArrow = true; } jQuery(".jssorb08l").css("visibility", hideLeftArrow ? "hidden" : "visible"); jQuery(".jssorb08r").css("visibility", hideRightArrow ? "hidden" : "visible"); } jssor_slider1.$On($JssorSlider$.$EVT_PARK, DisplayHideArrow); //hide arrow left at the beginning. DisplayHideArrow(0); }); </script>
|
Please see my second comment. To stop slider from looping, please set $Loop option to false. |
When i set $Loop = false, or $Loop = 0, it only move from first image to second image and then stops moving |
It won't move even you click arrow button? |
Yes, it only move one time |
There are some errors in your code. Also, please always specify size in pixel. |
Hi, |
please just place the following code just under var jssor_slider1 = new function DisplayHideArrow(index) {
var hideLeftArrow;
var hideRightArrow;
if (index == 0) {
hideLeftArrow = true;
}
else if (index == jssor_slider1.$SlidesCount() - 1) {
hideRightArrow = true;
}
jQuery(".jssorb08l").css("visibility", hideLeftArrow ? "hidden" : "visible");
jQuery(".jssorb08r").css("visibility", hideRightArrow ? "hidden" : "visible");
}
jssor_slider1.$On($JssorSlider$.$EVT_PARK, DisplayHideArrow);
//hide arrow left at the beginning.
DisplayHideArrow(0); |
Thanks! It works now. I even enhanced the code, in case there is only one picture and I don't want to see any arrows:
|
Hi all, |
I want to disable Previous Arrow Navigator on first slide and Next arrow on last slide . I have tried using jrror events but i didnot work. I need it urgent . Please help me to achieve this thing
The text was updated successfully, but these errors were encountered: