jQuery - novice to ninja 2nd ed. - 03/18 layout switcher

Hello ladies and gents, I know I’m late getting to the party, but I purchased Novice to Ninja quite a while back, and have finally gotten around to actually reading and following it along.

In chapter 3, section 18, the layout switcher hints that as you resize the screen, the layout should change automagically after the stylesheet is linked, but if memory serves me correctly, the stylesheet would only be applied if the page were refreshed.

So the resize function, although it adds the new “wide” stylesheet, doesn’t actually apply the new style.

Unless, of course, I’m doing something wrong. In my mind, I would have to link the stylsheet, and then apply the style to all the elements, then this would work correctly. Seems to me it might just be simpler if you would include the new styles in new classes, and apply those classes when the window is resized.

I’m mostly new to jQuery, but am trying to learn more. Thanks for your patience.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.