Forum: Ruby on Rails swapping css for browser resolution- reference screen width?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2dc03fec0d7d83cd133c3fa5a2a43f88?d=identicon&s=25 Angelo Mcdermott (avenasatira)
on 2007-07-23 18:44
Hello.

I'm currently saddened I cant reference the browser width in ruby. I'm
trying to use a periodically_call_remote function to trigger a ruby
function to change my css based on screen resolutions, but i cant pull
the screen resolution into a ruby variable!!

How can you do this?  I tried a conditional in my
periodically_call_remote, so i can trigger a function call for one
resolution, but not other!

(this is for swapping iphone resolutions)

anyone?
This topic is locked and can not be replied to.