ryanve / response.js

Responsive design toolkit
http://responsejs.com
Other
801 stars 123 forks source link

Ajax load() and response.js #55

Closed jsanglier closed 9 years ago

jsanglier commented 9 years ago

Hi Ryan

Can I use response.js to trigger .load()?

Where I have variations that are entire sections, it would be good to not load them at all if not needed.

I noticed a conversation along those lines from last year, but could not find a method.

Joss

ryanve commented 9 years ago

Currently Response breakpoint sets are not reactive to AJAX content added to the page after the sets are created. In retrospect I would design it differently to accommodate AJAX better. Your best option is to defer calling Response.create until all your content is loaded.

jsanglier commented 9 years ago

Thanks Ryan. It the long run it would be nice to see something like this accommodated. I suspect handling breakpoints and relating them to functions like ajax all in one script will be smarter and neater than me doing it in bits. :)

Mind you, my coding is so poor that anything is better than me doing it!!!