Last active
December 29, 2015 23:19
-
-
Save northk/7741966 to your computer and use it in GitHub Desktop.
HTML5 Figure and Figcaption example
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
<img class="caption" src="http://placehold.it/150x50" | |
title="This is my caption" | |
alt="A grey placeholder image" /> |
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
// wait until images have all loaded so we can properly get their width | |
$(window).load(function(){ | |
$('img.caption').captionate(); | |
}); |
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
<figure class="caption border"> | |
<img src="http://placehold.it/150x50" | |
title="This is my caption" | |
alt="A grey placeholder image" /> | |
<figcaption>This is my caption</figcaption> | |
</figure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment