Hello,
I would like to make my text go to another page on my website upon the second click. The idea is upon clicking the text once, it would show an image and upon the second click, it would take you to the linked page. I used onClick to get the image to show on the first click but cannot figure out how to make it so that a second click triggers a different event. I have tried onDblClick thinking it refers to the second click, but that is not the result that I am looking for.
Thanks!
Hello kache,
you say that you have already some code. so let’s work with it.
Show your code and then we will see what to do with it and where is the error.
Ok, just forget it
, here the code and an easy example…
import wixLocation from 'wix-location';
var clickCounter
$w.onReady(function () {clickCounter = 0});
export function button1_click(event) {
clickCounter=clickCounter+1
if (clickCounter>0) {$w('#vector1').show()}
if (clickCounter>1) {$w('#vector2').show()}
if (clickCounter>2) {$w('#vector3').show()}
if (clickCounter>3) {hide_allSTARS(), wixLocation.to("https://www.google.de")}
$w("#TXT").text = clickCounter.toString()
}
function hide_allSTARS (parameter) {$w('#vector1').hide()}
Example here…
https://russian-dima.wixsite.com/meinewebsite/blank-26