Copy link to clipboard
Copied
Hello,
My personal website always worked that way that when you click on a picture it jumped to the next; like a slideshow. However, since a few weeks it doesn’t work that way any longer and all images popped up at the same time instead. I've adjusted it right now so you can at least scroll down, but my knowledge in HTML is very outdated unfortunately. Does anyone you’ve got any idea what goes wrong initally and how to fix it?
Any help is appreciated.
Thanks!
Y
Copy link to clipboard
Copied
It appears your slideshow script was deleted from the server. But it appears to be from a server different than your own so it's possible you may need to find a replacement if the script you previously used is no longer being hosted.
Copy link to clipboard
Copied
1. jQuery Cycle is outdated.
2. You never should have referenced the script on GitHub because that's not a recognized CDN.
3. Rebuild your slideshow with jQuery Cycle 2. Download scripts directly from the source and upload them to your server. See link below.
https://jquery.malsup.com/cycle2/
Copy link to clipboard
Copied
Thank you. That sounds pretty far from my bed. I need to dig into this! Y
Copy link to clipboard
Copied
It's not difficult. Use the code examples on the jQuery Cycle 2 site.
Post back if you need more help.
Copy link to clipboard
Copied
Will do, thanks!
Copy link to clipboard
Copied
Thanks for your help, but it's not my cup of tea I guess. I don't understand what I've got to copy/replace were in my original website in order to make it work again...
Copy link to clipboard
Copied
Replace what you have now with the code below.
Copy link to clipboard
Copied
Thank you so much Ben, this is a tremendous help!! Thanks.
Copy link to clipboard
Copied
PS. Is it also possible to get rid of these arrows? Or place them outside the image?
Copy link to clipboard
Copied
Delete:
Copy link to clipboard
Copied
Thank you!
Copy link to clipboard
Copied
Your other script is here:
http://malsup.github.io/jquery.cycle.all.js
You just needed to change the link from .com to .io BUT as others have mentioned you need to download the script itself and link to it locally. Plus without any indication that you need to click on the images to loop through them, it's not clear what is supposed to happen so a self-revolving carosuel is probably a better idea or though it could be frustrating because a user may wish to stay longer on a particular image of interest to them, without the arrow buttons they are going to have to wait a long time to get back around to a particular image of interest, so I would recomend you re-instate the arrow buttons for better usability. I know the image is static IF you leave the cursor over the image but that's not obvious whereas the arrows are clear visual indicators.
Copy link to clipboard
Copied
PS. I've uploaded the new code on my website. So you can see how it currently works... Thanks!
Copy link to clipboard
Copied
Hi Ben,
Two more questions; hopefully you know how to fix it! I've adjusted some parts so it looks almost as it should.
1. The portrait / standing images are too big on the page. They don't fit in one window like the squared ones are. I don't like it that you've got to scroll to see an image. It needs to be visible at one page without scrolling (does that make sense?)
Is it possible to adjust that?
2. Can I enlarge the invisible boxes of the 'previous' and 'next' button till they are both covering half of the page? So when you click on the right side, you go next, and when you click on the left side, you go back.
Is that possible? And if so, how?
Thanks a lot again!!
My best,
Y
Copy link to clipboard
Copied
What size display do you have? What is your screen resolution?
On my device it looks fine, no scrolling needed.
All slideshows work best with images that are same size & aspect ratio.
For images of mixed size and aspect ratio, consider switching to a gallery & picture viewer like Fancybox3. See example below.
https://alt-web.com/GALLERY/Masonry-Gallery.php
Copy link to clipboard
Copied
1. The portrait / standing images are too big on the page. They don't fit in one window like the squared ones are. I don't like it that you've got to scroll to see an image. It needs to be visible at one page without scrolling (does that make sense?)
Well you have a problem there because the images you are refering to are tall and will only fit into the browsers window depth IF the user has their browser window set beyond the depth of the images themselves, otherwise the user WILL need to scroll vertically to see some of the image.
You can attempt to negate the problem by setting the width of ALL the images to a smaller width, this obviously means the depth of the images will be smaller and so have more chance of fitting into the browser window depth without having to scroll.
You can do this by changing the number of columns the carousel width takes up (see the line of code below, in red. You can experiment with the number of columns occupied by the carousel on different devices)
<div class="row mt-5">
<div class="col-9 col-sm-7 col-md-4 mx-auto">
2. Can I enlarge the invisible boxes of the 'previous' and 'next' button till they are both covering half of the page? So when you click on the right side, you go next, and when you click on the left side, you go back.
Is that possible? And if so, how?
I would highly recommend you re-instate the carousel arrow icons as per Bens code NOT your code. Your attempt to position the 'previous/next' text to be clear of the images has resulted in the text not being centered vertcially.
To position the arrows outside of the images you need to overide the default classes. Include the below css in your custom css styles. This MUST come AFTER the link to the Bootstrap default css file
.carousel-control-next,
.carousel-control-prev {
filter: invert(100%);
}
.carousel-control-next {
right: -75px;
}
.carousel-control-prev {
left: -75px;
}
Using the arrows rather than the text will give you more space on smartphones for the image, also arrow icons will provide clear guidance to the user that they can go backwards and forwards instead of assuming they will click about all over the place to find out how to move through the carousel, which is highly annoying.
Copy link to clipboard
Copied
Hi,
Thanks for your feedback! The first thing with the rows and columns is all clear. I will resize the images with the same height as well so it doesn't go up and down continuously.
I want to change the arrow part now, but I don't get it back the way Ben sent it to me. Plus, where do I need to paste that code of yours with -75 etc.?
I'm ok with arrows, as long as they are very small; like the font size at the top. Can you send me the code from what to place after the carousel with images so I don't remove things that shouldn't be removed? That would be a great help.
Thanks again!
Y
Thanks for your advice!
Copy link to clipboard
Copied
I'm ok with arrows, as long as they are very small; like the font size at the top. Can you send me the code from what to place after the carousel with images so I don't remove things that shouldn't be removed? That would be a great help.
================
Revert to the original code that Ben posted on June 6th.
Size matters greatly. Small targets are an accessibility problem for people on touch screen devices. An adult human finger tip radius is approx 45px. The default Cycle2 arrows are an appropriate size for average users on various devices. Changing size could adversely effect usability. So my advice is leave the size alone.
Good luck with your project! 🙂
Copy link to clipboard
Copied
That's good to keep in mind! All these different devices does not make it easier ;). Thank you.
Y
Copy link to clipboard
Copied
I agree, you should revert to the code posted by Ben then IF you did want the arrows outside of the images insert the below css code in your page directly before the closing </head> tag:
<style>
.carousel-control-next,
.carousel-control-prev {
filter: invert(100%);
}
.carousel-control-next {
right: -75px;
}
.carousel-control-prev {
left: -75px;
}
</style>
You can still experiment with the size of the images for mobile devices:
<div class="row mt-5">
<div class="col-9 col-sm-7 col-md-4 mx-auto">
The above sets a column width of 9 on smartphone, 7 on tablet and 4 on desktop.
The size of the arrows can be changed but since Bootstrap 5 uses svg you would have to change the viewBox parameters in the svg code to something like 0 0 25 25.
Copy link to clipboard
Copied
Thank you. I will dig into it.