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

  • Home
  • SEARCH
  • 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 3605234
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:05:54+00:00 2026-05-18T21:05:54+00:00

I have a loading image that works using the code below. It shows the

  • 0

I have a loading image that works using the code below. It shows the animated gif and waits for the html to be fetched from the url. Once it is fetched it hides the loading div and loads the html into the bite div. The html that is returned is all contained within jQuery Tabs however when the html is displayed the tabs are not rendered and just the li elements are shown.

Is it possible to fetch this html that contains jQuery tabs via AJAX and render these tabs? If so what am I doing wrong?

<div id="loader" style="text-align:center; display:none;">
<img src="img/ajax-loader.gif" alt="LOADING" />
</div>

<div id="bite"></div>

$(document).ready(function () {
  $('#loader').show();
  $.ajax({
    url:'http://www.domain.com/bitesized/main.php?uid=<?php echo $uid; ?>',
    complete: function(data){
        $('#loader').hide();
        $('#bite').html(data.responseText);
        // these divs ids are available after the load above and are meant to render the tabs
        $("#tabs").tabs();
        $("#fragment-a").tabs();
    }
  });
});
  • 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-18T21:05:54+00:00Added an answer on May 18, 2026 at 9:05 pm

    I created this code, which can load AJAX with a spinner. Note that i set and use the option “ajax_href”, which come from html rel attribute. You can also set option directly from each link. I also use “width” and “height” to resize each tab-content. looks nice, when having different content or files for the tabs.

    $(document).ready(function() {
    
    // check
    $('.jquery_tabs_ajax').each(function() { 
    
        // tabs
        var $tabs = $(this).tabs({ 
    
            cache: false,
            ajaxOptions: { async: true, cache: false },
            show: function(event, ui) {
    
                // get
                var my_panel_id = '#ui-tab-' + (ui.index + 1);
                var get_panel_id = $(my_panel_id);
                var get_parent_link = get_panel_id.parents('ul:eq(0) li a[href="' + my_panel_id + '"]');
                var get_parent_rel = get_parent_link.attr('rel');
    
                // check options
                if(get_parent_rel) {
    
                    // option object
                    var $obj_option = {};
    
                    // split
                    $split_option_a = get_parent_rel.split(';');
                    for(var so = 0; so < $split_option_a.length; so++) {
                        $split_option_b = $split_option_a[so].split('=');
                        $obj_option[$split_option_b[0]] = $split_option_b[1];
                    }
    
                    // load AJAX
                    if($obj_option.ajax_href) {
    
                        // set spinner
                        get_panel_id.html('<div class="spinner_container"><div class="spinner"></div></div>')
    
                        // load AJAX
                        $.ajax({
    
                            type: "POST",
                            url: $obj_option.ajax_href,
                            async: true,
                            cache: false,
                            success: function(response_text) {
    
                                // set HTML
                                get_panel_id.html(response_text);
                            }
                        });
                    }
    
                    // check resize
                    if($.colorbox && ($obj_option.width || $obj_option.height)) {
    
                        // resize
                        $.colorbox.resize($obj_option);
                    }
                }
            }
        });
    });
    

    });

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

Sidebar

Related Questions

I have a page P1 loading from site S1 which contains an iframe. That
UPDATED I used below solutions (loading Image from stream), but get new problem. img
I keep running across this loading image http://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif which seems to have entered into
I have some user controls that I'm loading in SharePoint and I would prefer
I have a situation where I'm loading some content using a URLLoader but the
I have noticed that some apps like Safari and Mail show a loading indicator
I have recently come across a situation where code is dynamically loading some libraries,
I have a aspx page that seems to be loading twice when I enter
I have a page that has lots of images and other code that would
I have a Box2D world which works great. I'm using it in a simple

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.