-
-
Save brycejacobson/9073253 to your computer and use it in GitHub Desktop.
Remove width and height attributes from images in Soliloquy sliders.
This file contains 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
<?php | |
add_action( 'tgmsp_callback_start', 'tgm_soliloquy_remove_image_attr' ); | |
function tgm_soliloquy_remove_image_attr( $id ) { | |
$script = 'var slides = $(slider).find(".soliloquy-slides > li img");'; | |
$script .= '$(slides).each(function(i){'; | |
$script .= '$(this).removeAttr("width height");'; | |
$script .= '});'; | |
echo $script; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment