Greetings Terry,
Quote from: terrybarth at Mar 30, 2014, 06:00 PMobvious now...
Chuckle. Been there, done that - many times. Community (& Google) inspire me on a regular basis.
Quote from: terrybarth at Mar 30, 2014, 06:00 PMJust curious what other methods you've used for switching out content like this.
Rather a roll-my-own technique, I'd have to say, and it varies from site-to-site based on needs.
It's based on thoughts published a couple of years ago by the Filament Group that they called the "Ajax-Include Pattern" (ref:
http://filamentgroup.com/lab/ajax_includes_modular_content/). As a part of the implementation, I use media query entry and exit callbacks fired by enquire.js (
http://wicky.nillia.ms/enquire.js/) to do the actions necessary for each MQ.
The place where it gets a bit tricky -- and perhaps Interchange has handled this -- but still managable, is when a device qualifies for two different media queries, such as different widths due to portrait or landscape orientation. You have to plan ahead for MQ entry and exit both the first time load, and once loaded such as when a phone user flips the phone on its side, then back, then back again, etc.
Cheers