Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I initialize a jquery function in an AJAX loaded tab?
    primarykey
    data
    text
    <p>I have my AJAX loaded tabs working correctly and this is the code:</p> <pre><code>&lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="../about-leadership-admin-ajax/"&gt;Leadership / Admin&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../about-sales-marketing-ajax/"&gt;Sales &amp; Marketing&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../about-service-desk-technicians-ajax/"&gt;Service Desk Technicians&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../about-technology-consultants-ajax/"&gt;Technology Consultants&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../about-manufacturing-consultants-ajax/"&gt;Manufacturing Consultants&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../about-salesforce-cpm-consultants-ajax/"&gt;Salesforce/CPM Consultants&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../about-developers-ajax/"&gt;Developers&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>and my initilization script:</p> <pre><code>&lt;script&gt; jQuery(function() { jQuery( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); jQuery( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); jQuery( "#tabs" ).tabs({ beforeLoad: function( event, ui ) { ui.jqXHR.error(function() { ui.panel.html( "Couldn't load this tab. We'll try to fix this as soon as possible." ); }); } }); }); &lt;/script&gt; </code></pre> <p>I have a jQuery slider on each one of the tabs. Only the first one (in the first tab that is loaded) works correctly until I navigate to a new one. When I come back to the first tab the slider is all screwed up. The initialization script I need to have on each AJAX loaded tab is:</p> <pre><code>&lt;script&gt; jQuery(document).ready(function(){ jQuery('#horiz_container_outer').horizontalScroll(); }); &lt;/script&gt; </code></pre> <p>I know (document).ready does not work. I need to know where and what to place in my tabs initialization script to make this work.</p> <p>I know I need to use one of several functions in jQuery but I have no idea what to use and where. My options look like .load(), .bind(), .success().</p> <p>I would love it if someone could point me in the right direction and be specific. Thanks in advance. I am also willing to pay for a solution:)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload