Skip to content

Instantly share code, notes, and snippets.

@bluemango
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluemango/9002559 to your computer and use it in GitHub Desktop.
Save bluemango/9002559 to your computer and use it in GitHub Desktop.
Javascript to set ScreenSteps alt tags that match step titles to ""
<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