beezee / djax

Dynamic pjax, responds to layout changes across requested pages
http://beezee.github.com/djax.html
171 stars 27 forks source link

Grabbing full page HTM #44

Closed rossberenson closed 9 years ago

rossberenson commented 9 years ago

Hello!

Great plugin from what I've seen. Thank you for the great work and the time you have spent on developing this. I'm having a small issue, but it's probably something on my end. It won't seem to update the content.

I'm using this code below. Fairly simple as you can see. I pretty much copied and pasted it from your example. I'm using this on a Wordpress site. When I click on a link, I see in the console, I see "Object" with the URL, Title, and the markup for the entire page. Just like what I see on your Wordpress example. I'm using the same class, and I placed the wrapper with the class "updatable" in the header.php and closing in the footer.php. Alternatively, I tried putting the wrapper on each template, like the github example on your site. (Took only 28 lines). That didn't work either. Do each templates have to be pretty much the same? Do I have to add the class to individual items that match throughout templates?

Any help would be much appreciated. Thank you.


$('body').djax('.updatable', ['wp-admin', 'wp-login', '?s=', 'pdf','doc','eps','png','zip','admin','feed']);

```
$(window).bind('djaxLoad', function(e, data) {
    console.log('triggered');
    console.log(data);
});
```

            
rossberenson commented 9 years ago

If there are others with a similar problem. You need to put the class wrapper on the most final template. I have a few templates with conditionals. It did not work when I was wrapping those kind of things. It worked when I wrapped the page content/markup in the class.