HTML5 Parallax Slider 2 Support Product Page
Answered
How do I use Behavior Connector with this to add links to slides?
Asked 20 Jul 2018 09:34:05
1
has this question
20 Jul 2018 09:34:05 Bruce Wilkie posted:
Hi thereI'm wanting to add links to my slides and it looks like using something called Behavior Connector is the way to do this.
When I click on the paper clip it opens up the behavior connector dialog. However, the only event/trigger available appears to be "onChange: When Slide is Changed".
I've done a search on the DMX website for "Behavior Connector" in case there were instructions somewhere for using this, but the search returned no results.
Screenshot below showing what I'm seeing.
Please can you let me know how to use the Behavior Connector in general, and more specifically how I can make slides click through to website pages.
thanks in advance
Bruce
Replies
Replied 20 Jul 2018 10:26:30
20 Jul 2018 10:26:30 Teodor Kuduschiev replied:
Hello Bruce,
Behavior connector is just a tool which shows the behaviors/actions available for the selected extension. As you can see there is no onclick event available for the slides. However you can just add a link in an element in your slide.
Behavior connector is just a tool which shows the behaviors/actions available for the selected extension. As you can see there is no onclick event available for the slides. However you can just add a link in an element in your slide.
Replied 20 Jul 2018 10:47:54
20 Jul 2018 10:47:54 Bruce Wilkie replied:
Thanks Teodor
So to make the whole slide link, do I just create an element that fills the slide area, give it a huge z-index, and then assign the behavior onClick to that instead?
Bruce
So to make the whole slide link, do I just create an element that fills the slide area, give it a huge z-index, and then assign the behavior onClick to that instead?
Bruce
Replied 20 Jul 2018 10:50:41
20 Jul 2018 10:50:41 Teodor Kuduschiev replied:
What i meant was to insert a button/link as an element in your slide: prntscr.com/k8tli6
Replied 20 Jul 2018 11:03:10
20 Jul 2018 11:03:10 Bruce Wilkie replied:
Oh, ok.
Is there a hack I can use to make the whole slide a link? Seems a bit of an oversight that we can't do it in the options.
If not, do you think it's something you could add in the next update for this extension?
Is there a hack I can use to make the whole slide a link? Seems a bit of an oversight that we can't do it in the options.
If not, do you think it's something you could add in the next update for this extension?
Replied 20 Jul 2018 11:16:39
20 Jul 2018 11:16:39 Bruce Wilkie replied:
OK, worked out a hack to make it work now (I'm not a javascript guy, so sorry if this was obvious lol)
For anyone else interested, you can just add the following to the slides:
onclick="location.href='newpage.htm';"
Example below showing the slide div and also an element inside it (you can click on this element rather than the background div and it seems to still work, which I didn't expect).
Note, I added the class 'clickable' so I could change the cursor to a pointer as a visual guide to people letting them know it's clickable.
<div class="dmxParallaxSliderSlide clickable" style="background-image:url(images/training/banner-cokemaking.jpg)" data-slide-title="Slide 2" onclick="location.href='training-cokemaking.htm';">
<div class="dmxParallaxSliderElement slider-heading" style="position:absolute;z-index:0;left:40px;top:40px;">Cokemaking Course</div>
</div>
cheers Teodor
Appreciate the quick response on this
Bruce
For anyone else interested, you can just add the following to the slides:
onclick="location.href='newpage.htm';"
Example below showing the slide div and also an element inside it (you can click on this element rather than the background div and it seems to still work, which I didn't expect).
Note, I added the class 'clickable' so I could change the cursor to a pointer as a visual guide to people letting them know it's clickable.
<div class="dmxParallaxSliderSlide clickable" style="background-image:url(images/training/banner-cokemaking.jpg)" data-slide-title="Slide 2" onclick="location.href='training-cokemaking.htm';">
<div class="dmxParallaxSliderElement slider-heading" style="position:absolute;z-index:0;left:40px;top:40px;">Cokemaking Course</div>
</div>
cheers Teodor
Appreciate the quick response on this
Bruce
Replied 20 Jul 2018 13:03:24
20 Jul 2018 13:03:24 Teodor Kuduschiev replied:
That's a nice solution, it should be working perfectly.