Clicking on a dynamically generated link to access a tab.

Clicking on a dynamically generated link to access a tab.

I have 4 tabs working fine.

I have a search bar on the 1st tab, when I click a button I have some javascript search a local SQLite database and edit a placeholder with the regular "innerHTML" to display a list of results.

I'd like these results to link to my 4th tab.

I can't for the life of me seem to do it...

I used the code below and it works fine for a "test" link I have placed (I can click the link and it takes me to my 4th tab). So for some reason the event is not getting "bound" to the dynamically generated links...


  1. $('#my-text-link').click(function() { // bind click event to link 
          $('#tabs').tabs('select', 2); // switch to third tab 
          return false; 
    });