Created
April 29, 2012 17:35
-
-
Save raideus/2552156 to your computer and use it in GitHub Desktop.
jQuery script for implementing fluid images on a WordPress site
This file contains hidden or 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
jQuery(document).ready(function($) { | |
// Remove width & height attributes from images (added by default in WordPress) | |
$('img').removeAttr('width').removeAttr('height'); | |
// Remove style attribute on image captions, which sets a fixed width by default | |
$('.wp-caption').removeAttr('style'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment