4 comments

[ 4.4 ms ] story [ 20.7 ms ] thread
Allows you to do two things:

  *  change around attributes on tags, usually src, href or class
  *  move HTML elements around the page
Based on whatever you want (Context.js):

  *  Window width
  *  touch capabilities
  *  pixel ratio
  *  [code your own here]
Is this more appropriate than doing the same thing in CSS/@media?
It goes way beyond what css and media queries can do. Imagine writing a media query for a slow-connection, large, high-resolution device in portrait mode, for a repeat, paid visitor, that moved the physical location of DOM elements as a result of the query.
What's "appropriate" depends entirely on what you are doing. Intention.js gives you really fine tuned control over how an element responds to different contexts, be it a width threshold, interaction mode, display resolution, could even use scroll depth or number of user's visits to the site.