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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:02:15+00:00 2026-05-23T22:02:15+00:00

I have a div to hold article content and it could be changed with

  • 0

I have a div to hold article content and it could be changed with ajax.

I need the content in this div and I use jquery function html() to do that, but it can only fetch the content before changing.

How can I get the immediate content using jquery?

Update:

It runs well in my own page and the problem comes with ‘share it to facebook’ button script from other sites.

This is an example script:

  <script type="text/javascript" charset="utf-8">
(function(){
  var _w = 72 , _h = 16;
  var param = {
    url:'dachaocai.com/bench/2',
    type:'3',
    count:'1', 
    appkey:'', 
    title:$('#title').html()+'(Bench->'+$('#b_name').html()+')'+'http://www.dachaocai.com/bench/2', 
    pic:'', 
    ralateUid:'', 
    rnd:new Date().valueOf()
  }
  var temp = [];
  for( var p in param ){
    temp.push(p + '=' + encodeURIComponent( param[p] || '' ) )
  }
  document.write('<iframe allowTransparency="true" frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?' + temp.join('&') + '" width="'+ _w+'" height="'+_h+'"></iframe>')
})()
</script>

I use html() to get the article title to share but it’s always the old one.
Any way to solve this?

  • 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-23T22:02:15+00:00Added an answer on May 23, 2026 at 10:02 pm

    You can use Jquery to do an asynchronous call to a server then in the callback you can append some Html to a div. I hope this helps. If you post some code I can update the answer.

    EDIT:
    Create a div to put the result in:

    <div id='result'></div>
    
    var url = "http://hits.sinajs.cn/A1/weiboshare.html?' + temp.join('&');
    $.get(url, function(data){
        $('#result').html(data);
    });
    

    In this way you can get the html from the server without having the complication of an iframe.
    Then you can read the data from the div

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

Sidebar

Related Questions

I've downloaded a JQuery plugin for a mousehold event. http://remysharp.com/2006/12/15/jquery-mousehold-event/ I have this div
I have a pretty standard css layout where I use a container div that
I have a problem with my layout. I have a content div that I
I have a block of HTML that I would like to use as the
I have the following function in javascript that calls the ajax which calls the
I have a panel sitting in a div, and I want to use that
I have a page with multiple divs that hold different sections of content. Initially,
I have this html <div> <input type=radio name=erp_report_type value=customerinvoice required> <label for=>Customer Invoice</label> <input
I have a function that gets raw HTML to output to a table, but
I have a lot of divs with the class headline, that hold 2 divs,

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.