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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:03:23+00:00 2026-06-01T05:03:23+00:00

Goal: I’m trying to refresh content inside a div so that if the user

  • 0

Goal: I’m trying to refresh content inside a div so that if the user is logged in, the page changes dynamically.

Progress: My first attempt was to use $("#tab_b").load("php/tabs.php #tab_b"); but this didn’t update the DOM so the jquery styling didn’t get applied. Then I tried adding the .trigger(‘create’) function $("#tab_b").trigger('create'); This only led the style blink on and off for a fraction of a sec. Then I tried the .append() function which seems to work, I’m using the following code to test the function and this works:

$("#tab_b").html('');
$("#tab_b").append("<button type='submit' data-theme='a'>Test button</button>").trigger('create');

the only problem I have is fetching the content from the php file and then appending it to the div.

Content that should be refreshed: ” #tab_b “

<div id="tab_b" class="content_div">    
    <?php

    if(!isLoggedIn())
    {
        ...
    }
    else
    {
        echo("
        <button type='submit' data-theme='a' id='logout' >Logout</button>
         ");
    }
    ?>
</div>

Any idea’s on how to do this? Also Any suggestions on improvements are welcome, I’m a beginner programmer.

This question is an attempt to solve a bigger problem discussed in my other topic:

jQuery Mobile does not apply styles after dynamically loading 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-06-01T05:03:25+00:00Added an answer on June 1, 2026 at 5:03 am

    this might work:

    $( '#tab_b' ).live( 'pageinit',function(event){
      alert( 'This page was just enhanced by jQuery Mobile!' );
    });
    

    I would look into the Event API

    • http://jquerymobile.com/demos/1.1.0-rc.1/docs/api/events.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal: I am trying to create a slightly dynamic page animated with basic canvas
Goal: Don't want the user to make changes in the program's size. Problem: Don't
Goal: In vB search results, to include posts that quotes the user when that
goal: I have the string 1234432144 I want to only replace the first 2
Goal To use a CREATE TYPE statement in HSQLDB 2.0.0 to create a user-defined
Goal : After user saves data to my mysql DB, a JSON teaser of
Goal: order records by 'start_date' select first record get the id of the record
Goal: create webservice that will query database and return rows, then pass it to
Goal: Make a decorator which can modify the scope that it is used in.
Goal: Provide a web service using Visual Basic or C# or .NET that interacts

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.