summaryrefslogtreecommitdiffstats
path: root/source/javascripts/caption.js
diff options
context:
space:
mode:
authorSkyArrow <tommy351@gmail.com>2012-01-24 18:15:25 +0100
committerSkyArrow <tommy351@gmail.com>2012-01-24 18:15:25 +0100
commit98d52c7c03e78c98cf2daa9729824e8752f8cb2a (patch)
tree61435b583fcbce884e128e20fd852b5f41154bca /source/javascripts/caption.js
parent4ab58d4e816bc5e998a936cc1ae5361f2dc46dfe (diff)
downloadoctopress-theme-jeyzu-98d52c7c03e78c98cf2daa9729824e8752f8cb2a.zip
octopress-theme-jeyzu-98d52c7c03e78c98cf2daa9729824e8752f8cb2a.tar.gz
picture caption
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