Last active
December 26, 2017 17:20
-
-
Save ryanve/16a5a65965e5fa9807a54f653a719440 to your computer and use it in GitHub Desktop.
[data-compute]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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