summaryrefslogtreecommitdiffstats
path: root/source/javascripts/caption.js
diff options
context:
space:
mode:
Diffstat (limited to 'source/javascripts/caption.js')
-rw-r--r--source/javascripts/caption.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/javascripts/caption.js b/source/javascripts/caption.js
new file mode 100644
index 0000000..271c428
--- /dev/null
+++ b/source/javascripts/caption.js
@@ -0,0 +1,9 @@
+(function($){
+ $('.entry img').each(function(){
+ var alt = $(this).attr('alt');
+
+ if (alt != ''){
+ $(this).after('<span class="caption">'+alt+'</span>');
+ }
+ });
+})(jQuery); \ No newline at end of file