Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6659701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:03:48+00:00 2026-05-26T02:03:48+00:00

I am using jQuery UI tabbed content as well as datatables to render the

  • 0

I am using jQuery UI tabbed content as well as datatables to render the information from our database. This is all on one page and since each table is just hidden on the page there’s a lot of queries to the database that are not needed.

The site uses zend framework and this page loads with one controller and view file. I was thinking of using partials but can they be loaded only after a tab is clicked? If so how? Or is there a better method to optimize this page of tabbed content?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:03:48+00:00Added an answer on May 26, 2026 at 2:03 am

    You can make the tab content loaded after user clicks on tab – in fact there is a simle example in jqueryui.com demos section.

    On the server side, you can divide tabs views into separate actions (just to clarify – I’m thinking here not about just partials, but separate action and view template for each tab), switch the layout off and render only the template:

    class FooController extends Zend_Controller_Action
    {
        public function barAction()
        {
            if($this->getRequest->isXmlHttpRequest()) {
                $this->_helper->layout->disableLayout();
            }
    
            // normal logic goes here
        }
    }
    

    And then in the view, the code for tabs can look similar to this:

    <script>
    $(function() {
        $( "#tabs" ).tabs({
            ajaxOptions: {
                error: function( xhr, status, index, anchor ) {
                    $( anchor.hash ).html(
                        "Couldn't load this tab. We'll try to fix this as soon as possible. " +
                        "If this wouldn't be a demo." );
                }
            }
        });
    });
    </script>
    
    <div id="tabs">
    <ul>
        <li><a href="#tabs-1">Preloaded</a></li>
        <li><a href="<?php echo $this->url(array("controller" => "foo", "action" => "bar"), "default", "true") ?>">Tab loaded by ajax</a></li>
    </ul>
    <div id="tabs-1">
        <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
    </div>
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm coding a tabbed interface using jQuery and whilst it all works, functionality wise,
I am using jquery tabs to load content from a remote file. I have
I want to set up some tabbed content on my site using jQuery and
Using a simple jQuery CSS tabbed-menu content box, how could I load each content
I am using jQuery Tools to create a tabbed box that gets content via
Using jQuery, how can I: Have all checkboxes on a page turned checked on
I'm using a JQuery Tabbed Menu which holds different types of forms and when
Using jQuery, is there a way to select all tag that reference a specific
Using jQuery, how do I delete all rows in a table except the first?
Using jQuery, what's the best way to automatically initialize a plugin on all current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.