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

172
Views
asignar id al botón de diálogo jquery

¿Cómo asigno una identificación a un botón de diálogo de jquery? Intenté lo siguiente pero no funciona

 buttons: { Ok: function() { id="xyz", ...
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Lo siguiente (aparentemente no documentado) me funciona con jQuery 1.8.9:

 $("#dlg").dialog({ buttons : { "MyButton" : { text: "My Button", id: "my-button-id", click: function(){ alert("here"); } } } });

El botón se puede direccionar a través de $("#my-button-id")

over 4 years ago · Santiago Trujillo Report

0

Este código del sitio oficial funcionó para mí:

 $('#dialog').dialog({ // properties ... buttons: [{ id:"btn-accept", text: "Accept", click: function() { $(this).dialog("close"); } }, { id:"btn-cancel", text: "Cancel", click: function() { $(this).dialog("close"); } }] });
over 4 years ago · Santiago Trujillo Report

0

@BerndB: Gracias, funciona perfectamente e incluso es más extensible.

 $('#loginlink').live('click',function(){ DC = 'login_box'; diaOpt = { autoOpen : true, width : 400, title : 'Login', buttons: { //valiudate login 'Login' : { text : 'Login Now', id : 'validateForm', click : function(){ } } } } launchDialog(diaOpt, DC); }); $('#validateForm').live('click', function(){ alert('Hellop'); $("#loginform").validate(); });
over 4 years ago · Santiago Trujillo 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!