Ajax request with jQuery without WP_ajax

I try to made a website in full ajax (a html5 website). I use jquery and innerShiv (for ie).

For exemple I want to load all the content of the "section" tag of a page. When I use that script, it works perfectly :

var link = 'http://ajax.wuiwui.net';
$('#new').load(link + ' #contenu');

But when i use this one, I can't find element which aren't into the wordpress loop...

$.ajax({
  url: link,
  processData: false,
  success: function(data){
    data = innerShiv(data,false);
    var truc = $(data).find('#contenu');
    $('#new').append(truc);
  }
});

For my project I want to load some elements with only one ajax request, so the second script is more intersting. But it dont work...

Do you know why ?

My project : http:/ajax.wuiwui.net

Thanks a lot for your help !

Topic loop ajax jquery html5 Wordpress

Category Web


I solved my problem!

In fact, jQuery can't parse an element at the root stage. I just wrap all my body content into a div, and it works.

I can also use filter function instead of find.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.