Skip to content

Instantly share code, notes, and snippets.

@deJaVisions
Created March 15, 2012 06:53
Show Gist options
  • Select an option

  • Save deJaVisions/2042594 to your computer and use it in GitHub Desktop.

Select an option

Save deJaVisions/2042594 to your computer and use it in GitHub Desktop.
jquery data selector
<img class="material_thumb" data-large_image="/system/images/1/large/lighthouse.jpg?1331724339" id="material_thumb_1" name="al" src="/system/images/1/thumb/lighthouse.jpg?1331724339"/>
hi - if i have that tag, how to i extract the data-large_image value with coffeescript and or jquery?
[11:47pm] doktorj: it must be simple
[11:48pm] doktorj: i keep thinking it's something like: large_image = $("material_thumb_#{thumb_id}").data('large_image') and have tried all kinds of combinations, but can't' seem to get the single data value out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment