how do i add a click handler to a custom jquery ui widget and use the widget property in the handler?

To address this, you will want to use an .on() for click and also call the gid via the Getter.



  $("#tablesList").on("click", ".raspasy-table", function() {
    var myID = $(this).table("option", "gid");
    console.log('table clicked: ' + myID);
    alert('table clicked: ' + myID);

I would advise moving this into the _create function. To do this, you add the .click() after the table has been created.


CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top