I am trying to run a javascript only on mobile phone using Foundation and Rails, (and haml, this is haml example, but don't pay attention to that).
I am doing something like this:
.row
=# something for large screens
.row.show-for-small-only
.small-10.small-centered.columns
= javascript_tag "$('.someClassIPointTo').myfunction();"
So I am trying to run this javascript only for small size screens, and NOT for large screens. Is there a way for doing that other then duplicating the code?