im newbie on javascript
I try add .onclick() action on wix console interface but i think i made some error on my code :
import {local} from 'wix-storage';
import wixWindow from 'wix-window';
$w.onReady(function () {
if('#button2').onClick {
wixWindow.openLightbox("Conditions générales de vente");
}
} );
I try to understanding the particularly .onClick()
on their API but i do not see...
https://www.wix.com/velo/reference/$w/selectiontags/onclick
Thanks
CodePudding user response:
onClick()
is a function. The event handler is the argument to the function.
$w.onReady(() => {
$w('#button2').onClick(() => {
wixWindow.openLightbox("Conditions générales de vente");
});
});