I've found a couple of examples on how to lazy load jQueryUI, but none uses Events/one. That seems perfectly suited to this task as it defines an event handler which only runs once.
I can't quite put it all together though. If I load content via AJAX by putting a link in the tab's <li>
, I can't figure out how to only load it once without disabling the entire link.
Has anyone thought this through?
EDIT: This might be important: I want to do this because the content of each tab contains a link to fetch another page of data. If the original AJAX link is hit each time, users will lose the page of data they're currently displaying.