Sometimes you just want to retinify images you know to have @2x.
retina.js doesn't work and
query.retina tries to check if @2x files exist and in my case static was on another domain – Rackspace CloudFiles so it raises CORS alert. As it was very simple I decided to implement this few lines of code myself. :-) Okay, lazy but...
Anyway if you find it helpful for you feel free to use it! And have a nice day/night wherever you are !
# Retina is here
if window.devicePixelRatio >= 2
retinaImages = $ 'img[data-retina]'
retinaImages.each (i) ->
retinaImages[i].src = $(retinaImages[i]).data('retina')