Switching/Linking to another external stylesheet in a .js file using Ruby on Rails
- by Jake
Im learning JQuery from a Sitepoint Book but Im trying to apply all the lessons to a Rails App. In one lesson, we are taught how to switch to a different stylesheet if the browser window is resized beyond a certain point. Here's the javascript code:
if ($('body').width() > 900) { $('<link rel="stylesheet" href="wide.css" type="text/css"…