Skip to content

Instantly share code, notes, and snippets.

@originalhat
Created December 12, 2012 05:21
Show Gist options
  • Save originalhat/4265060 to your computer and use it in GitHub Desktop.
Save originalhat/4265060 to your computer and use it in GitHub Desktop.
//% Fixed Width Figures
function figureWidth()
{
var cap=$('figcaption'),
fig=$('figure'),
figWidth;
$(fig).each(function()
{
fig=$(this).children('img');
figWidth=$(fig).outerWidth();
cap=$(this).children('figcaption');
cap=$(this).children('figcaption');
cap=$(this).children('figcaption');
$(cap).outerWidth(figWidth);
}
);
}
figureWidth();
//%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment