Load text from specific external DIV using AJAX?

Posted by Josh on Stack Overflow See other posts from Stack Overflow or by Josh
Published on 2010-06-09T00:14:53Z Indexed on 2010/06/09 0:22 UTC
Read the original article Hit count: 739

Filed under:
|
|
|

I'm trying to load up the estimated world population from http://www.census.gov/ipc/www/popclockworld.html using AJAX, and so far, failing miserably.

There's a DIV with the ID "worldnumber" on that page which contains the estimated population, so that's the only text I want to grab from the page.

Here's what I've tried:

  $(document).ready(function(){
    $("#population").load('http://www.census.gov/ipc/www/popclockworld.html #worldnumber *');
  });

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX