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 6962559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:40:35+00:00 2026-05-27T15:40:35+00:00

the jquery ui tabs remote data fetch features is great, however I am having

  • 0

the jquery ui tabs remote data fetch features is great, however I am having difficulty bending it to my will.

I followed the documentation to get it to fetch remote data through ajax calls with the following code:

    $(function(){

    // Tabs
        $('#tabs').tabs({
            ajaxOptions: {
                error: function( xhr, status, index, anchor ) {
                    $( anchor.hash ).html("Couldn't load rankings" );
                }
            }
        });           
    });

and

    div id="tabs">
        <ul>
            <li><a href="ajax/firstcall">first</a></li>
            <li><a href="ajax/secondcall">second</a></li>
        </ul>
    </div>

The feature works great, but the response from the ajax calls are dumped directly into the display area of the tab when a tab is selected. Is there a way to use Mustache to render a template from the ajax response? I tried to mess with the success .ajax function from jquery, but it seems loading the raw content still occurs.

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-27T15:40:35+00:00Added an answer on May 27, 2026 at 3:40 pm

    If it’s possible, can I have a look at your attempt at using the success ajax option? I suggest you grab the existing HTML content when the ajax request is successful then run it through Mustache.to_html() and add it back into the content area. So, something like:

    success: function( data ){
        // Get selected tab index
        var selected = $('#tabs').tabs().tabs('option', 'selected');
        // Use index to form ID for selector and replace content
        $('#ui-tabs-'+selected).html(Mustache.to_html(data, {mustache: 'Test View'}));
    }
    

    That’s assuming you have a template with a {{mustache}} tag – in the code above, it would be replaced with “Test View”.

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

Sidebar

Related Questions

I have a jQuery tabs element that is working great at loading remote content.
I am using jquery tabs to load content from a remote file. I have
I need jQuery tabs that will also work with a URL Example I have
I've implemented jQuery UI tabs in an Rails app, and I get an error:
I'm loading a template profile_messages as part of jQuery UI Tabs with Ajax. However
In previous versions of jQuery tabs there was an option to automatically set the
I am implementing jQuery tabs on mysite, one of the tabs holds a form
I'm using the jquery tabs plugin and want to have the background a light
seems like I'm stuck with jQuery tabs. I'm trying to pass selected tab name
I have a page that is using jQuery tabs. Within one of my tabs

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.