So i have an Owl Carousel that contains three images. I also added custom navigation arrows (.png images) on left and right sides. However, those arrows are currently useless, because I can't find a way to actually make them switch between images of my Owl Carousel. I searched endlessly and can't find the solution. Any ideas?
相关问题
- Views base64 encoded blob in HTML with PHP
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
Complete tutorial here
Demo link
JavaScript
CSS Style for navigation
my solution is
navigationText: ["", ""]
full code is below:
Create your custom navigation and give them classes you want, then you are ready to go. it's simple as that.
Let's see an example:
In your js file you can do the following:
You can use a JS and SCSS/Fontawesome combination for the Prev/Next buttons.
In your JS (this includes screenreader only/accessibility classes with Zurb Foundation):
In your SCSS this:
For the FontAwesome font-family I happen to use the embed code in the document header:
There are various ways to include FA, strokes/folks, but I find this is pretty fast and as I'm using webpack I can just about live with that 1 extra js server call.
And to update this - there's also this JS option for slightly more complex arrows, still with accessibility in mind:
Loads of escaping there, use single quotes instead if preferred.
And in the SCSS just comment out the ::before attrs:
You need to enable navigation and edit navigationText:
> Assuming this is
version 1.3.2
owlgraphic.com/owlcarousel/#customizingNote: It appears the site for Owl 1.3 is now down, so here is a forked Codepen example.
> Assuming it's
version 2
:https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html#nav
Personal suggestion: Use Slick over Owl
Personal suggestion update: Tiny slider is great too.
In owl carousel 2 you can use font-awesome icons or any custom images in navText option like this: