How do I call OnClick event on Slider images? #712
Unanswered
swamisnawale
asked this question in
Q&A
Replies: 1 comment 3 replies
-
This works for me and gives the image url in
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Slider only to show my contents. For all the images I am using, they all have different URL's associated and I want them to open when I click on image or when I click on description. How can I do this?
I'm using onClick in this way, but its not working. Am I doing this in wrong way?
const images = [
{
original: 'https://picsum.photos/id/1015/1000/600/',
thumbnail: 'https://picsum.photos/id/1015/250/150/',
onclick: function(){
window.open('www.google.com')
}
},
{
original: 'https://picsum.photos/id/1019/1000/600/',
thumbnail: 'https://picsum.photos/id/1019/250/150/',
onclick: function(){
window.open('www.youtube.com')
}
},
Beta Was this translation helpful? Give feedback.
All reactions