Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
What wrong with .onclick() event?

im newbie on javascript

I try add .onclick() action on wix console interface but i think i made some error on my code :

enter image description here

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

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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");
  });
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!