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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:09:46+00:00 2026-05-25T22:09:46+00:00

I am using load() to grab a section of a .php page and replace

  • 0

I am using load() to grab a section of a .php page and replace content in a div dynamically.

The index page has a jquery-ui tab widget on it that works fine upon initial load. When I use load() to change out the content, and then go back to the original home page with the ui-tabs on it (via AJAX), there is no onclick functionality (ie. they take me to the #tabs-1-fragment instead of updating the tabs dynamically).

I have researched it a bit and have found that once a section is destroyed via AJAX, when it loads again it will not have the event handlers bound to it. The recommended course of action is to attach the “live()” handler instead of “bind()”, but since I am calling upon a Jquery UI widget, I can’t think of a way (besides editing the source code or building my own tabs) that I could do that.

I have been searching for a few hours but have no really found an answer to this question.

Am I missing something basic?

Here is the code used on the navigation links to call the page content:

$(document).ready(function(){


$('#studioNav').click(function() {
    $('#mainContent').animate({opacity:0}, 1000, function(){
    $('#mainContent').load('studio.php #studio');
    });
    $('#mainContent').animate({opacity:1}, 1000);
    $('#nav li').removeClass('current');
    $(this).addClass("current");
    return false;
    });

$('#contactNav').click(function() {
    $('#mainContent').animate({opacity:0}, 1000, function(){
    $('#mainContent').load('contact.php #contact');
    });
    $('#mainContent').animate({opacity:1}, 1000);
    $('#nav li').removeClass('current');
    $(this).addClass("current");
    return false;
    });


$('#calendarNav').click(function() {
    $('#mainContent').animate({opacity:0}, 1000, function(){
    $('#mainContent').load('calendar.php #calendar');
    });
    $('#mainContent').animate({opacity:1}, 1000);
    $('#nav li').removeClass('current');
    $(this).addClass("current");
    return false;
    });

    $('#homeNav').click(function() {
        $('#mainContent').animate({opacity:0}, 1000, function(){
        $('#mainContent').load('index.php #featured');
        });
        $('#mainContent').animate({opacity:1}, 1000);
        $('#nav li').removeClass('current');
        $(this).addClass("current");
        return false;

    });

})

It’s not pretty code (I am a beginner to javascript and jquery).

The tabs section is:

<div id="mainContent">

              <ul class="ui-tabs-nav">
                <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-1">
                    <a href="#fragment-1"><span>Friday, August 26th</span>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer</a>
                </li>
                <li class="ui-tabs-nav-item" id="nav-fragment-2">
                    <a href="#fragment-2"><span>Friday, August 26th</span>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer</a>
                </li>
                <li class="ui-tabs-nav-item" id="nav-fragment-3">
                    <a href="#fragment-3"><span>Friday, August 26th</span>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer</a>
                </li>
                <li class="ui-tabs-nav-item" id="nav-fragment-4">
                    <a href="#fragment-4"><span>Friday, August 26th</span>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer</a>
                </li>
              </ul>

            <!-- First Content ---------------->
            <div id="fragment-1" class="ui-tabs-panel" style="">

                <img class="featured_img" src="http://placehold.it/315x275" alt="Balls" />

                <ul class="featured_meta">
                    <li><a href=" ">Link to their music in the archives</a></li>
                    <li><a href="http://blogspot.sheastadium.com/ ">Link to full blog Post</a></li>
                </ul>

                <div class="socialMedia">
                    <div class="facebook">
                        <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="button_count" width="120" show_faces="false" action="like" font=""></fb:like> 
                    </div>
                    <div class="twitter">
                        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                    </div>
                </div>

                 <div class="info" >
                    <h2>Friday, August 26th</h2>
                    <p>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer, Glowing Pains & Tape Recorder</p>
                    <h3>Doors at 8pm</h3>
                    <h3>Cover: $8</h3>
                 </div><!--END INFO-->
            </div><!--END FRAG 1-->

            <!-- Second Content -->
            <div id="fragment-2" class="ui-tabs-panel ui-tabs-hide" style="">
                <img class="featured_img" src="http://placehold.it/315x275" alt="" />

                <ul class="featured_meta">
                    <li><a>Link to their music in the archives</a></li>
                    <li><a>Link to full blog Post</a></li>
                </ul>

                <div class="socialMedia">
                    <div class="facebook">
                        <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="button_count" width="120" show_faces="false" action="like" font=""></fb:like> 
                    </div>
                    <div class="twitter">
                        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                    </div>
                </div>

                 <div class="info" >
                    <h2>Friday, August 26th</h2>
                    <p>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer, Glowing Pains & Tape Recorder</p>
                    <h3>Doors at 8pm</h3>
                    <h3>Cover: $8</h3>
                 </div><!--END INFO-->
            </div><!--End second fragment-->

            <!-- Third Content -->
            <div id="fragment-3" class="ui-tabs-panel ui-tabs-hide" style="">
                <img class="featured_img" src="http://placehold.it/315x275" alt="" />

                <ul class="featured_meta">
                    <li><a>Link to their music in the archives</a></li>
                    <li><a>Link to full blog Post</a></li>
                </ul>

                <div class="socialMedia">
                    <div class="facebook">
                        <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="button_count" width="120" show_faces="false" action="like" font=""></fb:like> 
                    </div>
                    <div class="twitter">
                        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                    </div>
                </div>

                 <div class="info" >
                    <h2>Friday, August 26th</h2>
                    <p>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer, Glowing Pains & Tape Recorder</p>
                    <h3>Doors at 8pm</h3>
                    <h3>Cover: $8</h3>
                 </div><!--END INFO-->
            </div><!--End third fragment-->

            <!-- Fourth Content -->
            <div id="fragment-4" class="ui-tabs-panel ui-tabs-hide" style="">

                <img class="featured_img" src="http://placehold.it/315x275" alt="" />

                <ul class="featured_meta">
                    <li><a>Link to their music in the archives</a></li>
                    <li><a>Link to full blog Post</a></li>
                </ul>

                <div class="socialMedia">
                    <div class="facebook">
                        <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="button_count" width="120" show_faces="false" action="like" font=""></fb:like> 
                    </div>
                    <div class="twitter">
                        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                    </div>
                </div>

                 <div class="info" >
                    <h2>Friday, August 26th</h2>
                    <p>Digit Dealer EP Release w/ Lionshare, Wolf Couture, Sludgehammer, Glowing Pains & Tape Recorder</p>
                    <h3>Doors at 8pm</h3>
                    <h3>Cover: $8</h3>
                 </div><!--END INFO-->
            </div><!--End fragment 4-->
        </div><!--End slider-->
</div><!--End Main Content-->
  • 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-25T22:09:47+00:00Added an answer on May 25, 2026 at 10:09 pm

    You could just re-attach the events in the complete callback of the load() function:

    $('#div').load('my.php', function(responseText, textStatus, XMLHttpRequest) {
      $('#tabs').tabs();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to grab an id dynamically using to load up content in
I'm using the .load() function in jquery to insert the results of a php
I'm using the .load() function to load a section of html that has some
I am loading a set of images from another page using jquery load() function.
I am using lazy load jquery plugin . It tells me to put this
I am using jQuery .load to call an action but it is not found.
I am using jquery load method to update divs , it works great until
What is the best way to load content into my infowindow using ajax? Right
I'm using Drupal 6.x and I'm writing a php class that will grab an
I am using jQuery to grab some JSON and then plug it into some

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.