Skip to content

Instantly share code, notes, and snippets.

@ryanve
Last active December 26, 2017 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanve/16a5a65965e5fa9807a54f653a719440 to your computer and use it in GitHub Desktop.
Save ryanve/16a5a65965e5fa9807a54f653a719440 to your computer and use it in GitHub Desktop.
[data-compute]
$(function() {
function report() {
$("[data-compute]").each(function() {
var element = $(this)
element.text(element.css(this.dataset.compute));
})
}
report()
$(window).resize(report)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment