We use bxSlider, a simple jQuery image slider, at https://slideator.com/users/record_app/record/test_ver_1_8_0/?slides=_slideator to display and control slide thumbnails in the right-hand canvas. Users also can navigate through slides using Next and Previous buttons in the above toolbar.
Here is the code to add slide thumbs
<div class="bxslider">
<div><img src="/assets/images/coffee1.jpg" title="Funky roots"></div>
<div><img src="/assets/images/coffee2.jpg" title="The long and winding road"></div>
<div><img src="/assets/images/coffee3.jpg" title="Happy trees"></div>
</div>
The questions is: Is it possible to scroll slides down and up in the slider when the user click Next or Previous buttons? Any other solution support this issue?
Related
I am using slick slider and i want to add/remove "active" in a div which is outside (somewhere else in the page) slick slider code. For example: I have this code for the slider.
<div class="slider">
<div class="showcase-1"><img src="img/1.jpg" alt="" /></div>
<div class="showcase-2"><img src="img/2.jpg" alt="" /></div>
<div class="showcase-3"><img src="img/3.jpg" alt="" /></div>
</div>
Now on change of slide, "active" class should be added to div and then the "active" class should be removed by itself when the slide is changed and it should be added to second div which is for second slide. Note that every div is for each slide. Like first div is for "showcase-1" slide and second div for "showcase-2".
<div class="showcase"></div>
<div class="showcase"></div>
<div class="showcase"></div>
I tried this jquery and it's working good but it's not changing the classes on change of slides.:D i am sure this is not a right way!
$(function() {
if ($(".slider .showcase-1").hasClass("slick-current")) {
$("div.showcase-1").addClass('active');
} else {
$('div.showcase-1').removeClass('active');
}
});
It looks like Slick slider developers have already found and fixed this bug where all slides were getting the "slick-active" class. Now all slides get slick-active but only the current slide gets "slick-slide slick-current slick-active" classes.
If you use the latest version of Slick you will receive this improvement and won't have to write your own.
See the Slick slider demos here and inspect them and you will see these more helpful, updated classes.
I have this code:
<section data-featherlight-gallery="" data-feather-filter="a">
<a class="apt-gallery-d" href="img.png">
<img class="module-img-size" src="img.png" alt="1 Alcoba">
</a>
<a class="apt-gallery-d hidden" href="img.png">
<img class="module-img-size" src="img.png" alt="1 Alcoba">
</a>
</section>
jQuery(document).ready(function() {
jQuery('a.apt-gallery-d').featherlightGallery({
openSpeed: 300,
previousIcon: ' ',
nextIcon: ' ',
variant: 'custom-lightbox-css',
loading: 'Cargando...',
});
})
When the lightbox opens, a slider appears with the default lightbox navigation, however the navigation isn't very user friendly. You don't know when you've seen the last image because it looks like and endless loop. Also, if I have only one image the navigation appears regardless.
How can I better control when this next prev arrows show up?
From the doc:
It sets the classes 'featherlight-first-slide' and 'featherlight-last-slide' if the current slide is the first and/or last one.
You can use those to customize the look or disable the previous & next buttons as you wish
I am using following theme for one of website (click here). This theme come with one background image and i modified this to multiple background images for 'section' tag <section id="intro" class="intro"></section>
This script doesn't wok properly as it show black screen in between image at time.
codepen example
<!-- Section: intro -->
<section id="intro" class="intro">
<div class="slogan">
<h1><span class="text_color">WELCOME TO SQUAD</span> </h1>
</div>
<div class="page-scroll">
<div class="wow shake" data-wow-delay="0.4s">
<a href="#latest-tabs" class="btn btn-circle">
<i class="fa fa-angle-double-down animated"></i>
</a>
</div>
</div>
</section>
<!-- /Section: intro -->
I am using a trick and showing all these image also in another div with it display property, this way helped to to resolve black screen between image transition as all image are cached if i am not wrong if i dont put these image in a hidden div then each image takes time to download.
<div class="background-images" style="display: none !important;">
<img src="http://bootstraptaste.com/theme/squadfree/img/bg1.jpg" />
<img src="http://feelgrafix.com/data_images/out/12/859698-nature-background.jpg" />
<img src="http://interest.ge/inter/app/interest/data/uploaded/20140923140402202316338_photo.jpg" />
<img src="http://interest.ge/inter/app/interest/data/uploaded/20140923140344524813450_photo.jpg" />
<img src="http://feelgrafix.com/data_images/out/15/897490-stunning-nature-background.jpg" />
</div>
Overall you will notice that it breaks, for some reason it some works well in other browser other than FF.
i need to fix this or need another script which can show slid show for a container div as shown in this example and works well with fadein fadeout effect
It looks like that images are being downloaded via a GET request each time JS switches them. Try to cache them somehow so you can save some time on a get/redirect requests.
I think the black screen is caused by the image source, if you look the image source when black screen occurs, it doesn't show an image, and if you navigate to that source through the browser, it gives you an redirect to a different page.
This issue is caused due to incorrect image source...
For ex. this URL is not redirecting to any image..
"http://feelgrafix.com/data_images/out/15/897490-stunning-nature-background.jpg"
Does anyone know if you can set a duration interval for EACH SPECIFIC slide (Not transition) using jssor with $AutoPlay option set to TRUE?
I can now set all slide duration with $Idle=1000ms but I need to have for example:
SLIDE1: pause here for 2000ms
SLIDE2: pause here for 3000ms
...
Any Idea?
I have just added this feature, please download the latest version.
Now you can set $Idle option,
and also, you can set idle time for each individual slide as follows,
<div u="slides" ...>
<div><img data-u="image" src="image_url_1" /></div>
<div data-idle="2000"><img data-u="image" src="image_url_2" /></div>
<div data-idle="3000"><img data-u="image" src="image_url_3" /></div>
</div>
Edit
The new option should be $Idle instead of $AutoPlayInterval.
See http://www.jssor.com/development/reference-options.html
I have an unordered list of image thumbnails. Each thumbnail links to the full size image.
I use the YUI3 library to allow drag & drop reordering of the thumbnail images (just the out-of-the-box example code).
The problem is the link to the fullsize image: it is not draggable. Only the small portions underneath the thumbnail (with title and value) are draggable.
<ul>
<li class="imgcontainer">
<div>
<a href="/image.jpg">
<img src="thumbnail.jpg" border="0" alt="" />
</a>
</div>
<div class="left">Title</div>
<div class="right">$2.00</div>
<div class="clear"></div>
</li>
<!-- ... -->
</ul>
What is the best way to allow users to reorder the images in such an image gallery?
Add a drag handle icons to a corner of the list items?
Create a "reorder mode" in which the link anchors are removed, leaving only draggable images?
Or can it be set up so that the links still can be dragged?
Your problem is that the anchor tag is not a valid drag handle per default. You can change this by using removeInvalid('a') on your drag instance.
var dd1 = new Y.DD.Drag({
node: '#drag1'
});
dd1.removeInvalid('a');
Another option would be to remove the anchor tag
<div class="linked-image">
<img src="http://placekitten.com/50/50" border="0" alt="" />
</div>
and add a click listener to the image.
Y.on('click', function () {
alert('go to url');
}, '.linked-image');
Both approaches are demonstrated here: http://jsfiddle.net/xGQne/
Note that the click event fires after the drag is completed in both cases. You will need to differentiate between clicks and drags to make this work smoothly.