jQuery-UI How-to stop realoding the tabs

Posted by user256034 on Stack Overflow See other posts from Stack Overflow or by user256034
Published on 2010-03-30T12:17:43Z Indexed on 2010/03/30 12:23 UTC
Read the original article Hit count: 239

Filed under:

I'm using jQuery UI tabs functionality to load tab content via Ajax. But I need to load the tabs only once. At the first request.

<div id="tabContainer">
<ul>
  <li><a href="/Home/Tab1">Tab1</a></li>
  <li><a href="/Home/Tab2">Tab2</a></li>
  <li><a href="/Home/Tab3">Tab3</a></li>
</ul>
</div>

I hooked up the select event. I'm able to see if the content is already loaded or not.But I'm missng the point how to stop jQuery from sending the request.

 $("#tabs").tabs({
        select: function(event, ui) {

            if (ui.panel.innerHTML != '') {

                 //What to do here to stop jQuery from sending the request.
                 return;
            }
        }
    });

© Stack Overflow or respective owner

Related posts about jquery-ui