beezee / djax

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

Doesn't work with trackable elements that are direct children of body #22

Open DavidOliver opened 11 years ago

DavidOliver commented 11 years ago

While setting up my views for those occasions when I simply want to replace all of the page content rather than small portions, I found that a direct child of body can't be used as a trackable element:

<body id="body">
  <div id="main" class="updateable">

So I'm using an extra div that I otherwise wouldn't have done:

<body>
  <div id="main-wrapper">
    <div id="main" class="updateable">

I don't know if you'd want or be able to accommodate using direct children of body, but thought I'd mention it anyway as I spent a little while trying to get it to work before I figured it out, so it may be worth mentioning this in the documentation.

DavidOliver commented 11 years ago

Sorry - I forgot to describe what actually happens. The network requests and response seem to be fine, but the trackable element isn't updated and instead disappears.