/[drupal]/contributions/modules/image_caption/image_caption.js
ViewVC logotype

Contents of /contributions/modules/image_caption/image_caption.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Fri Mar 7 05:46:23 2008 UTC (20 months, 3 weeks ago) by davidwhthomas
Branch: MAIN
CVS Tags: DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--2-1, DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-6--2
Changes since 1.1: +0 -0 lines
File MIME type: text/javascript
Drupal 6.x update
1 /*$Id$*/
2 $(document).ready(function(){
3 $("img.caption").each(function(i) {
4 var imgwidth = $(this).width();
5 var imgheight = $(this).height();
6 var captiontext = $(this).attr('title');
7 var alignment = $(this).attr('align');
8 $(this).attr({align:""});
9 $(this).wrap("<div class=\"image-caption-container\" style=\"float:" + alignment + "\"></div>");
10 $(this).parent().width(imgwidth);
11 $(this).parent().append("<div class=\"image-caption\">" + captiontext + "</div>");
12 });
13 });

  ViewVC Help
Powered by ViewVC 1.1.2