Last active
August 29, 2015 13:56
-
-
Save bluemango/9002559 to your computer and use it in GitHub Desktop.
Javascript to set ScreenSteps alt tags that match step titles to ""
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
<script type="text/javascript" language="Javascript" > | |
jQuery(document).ready(function($) { | |
$('.step').each(function(index) { | |
var title_tag = $(this).find('>h2'); | |
title_tag = title_tag || $(this).find('>h3'); | |
var img = $(this).find('img'); | |
if ($(title_tag).text() == $(img).attr('alt')) { | |
$(img).attr('alt', ''); | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment