Is there an event I can listen for or condition I can check from a primary page to know when a page include has finished loading?
I have a tabset where each tab contains a page include, and I am trying to run some code on the tabshow event, which needs to jQuery the contents of the page include of the active tab ( I want to make some modifications to the UI based on whether the tab contains a wizard). But the code in the ‘tabshow’ event is obviously running before the page include is finished loading. What’s the best way to get the ‘tabshow’ code to wait for the page include to load?
Here’s an excerpt of what we’ve got so far:
<br>// Set tabshow function<br>$(tabSet).on('tabshow',function(event, data){<br> console.log(event);<br> console.log(data);<br> // Save record into log for previous tab.<br> TimeOut = event.timestamp;<br> saveProcessLog();<br> // Start log entry for the new tab.<br> TabName = data.tab.context.text;<br> TimeIn = event.timestamp;<br> <b>// Check if current tab contains wizard and disable/enable buttons accordingly.</b><br><b> console.log('Wizard exists before timeout: ' + !!$(data.panel).find('.nx-wizard').length);</b><br><b> setTimeout(checkPanelForWizard(data.panel), 1000);</b><br><b> /// 1000 is not long enough. Is there a way to wait for pageinclude load?</b><br>});<br>