Created
January 13, 2020 14:32
-
-
Save JudeRosario/a15ae1bf736cd654280778c7d1396f1a to your computer and use it in GitHub Desktop.
Get themes ADA Compliant by supplying defaults
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
$.each($('a'), function() { | |
alt = this.href.replace(/\/$/, "") | |
$(this).attr('alt', alt.substring(alt.lastIndexOf('/') + 1).replace(/-/g, " ")); | |
}); | |
$.each($('img'), function() { | |
alt = this.href.replace(/\/$/, "") | |
$(this).attr('alt', alt.substring(alt.lastIndexOf('/') + 1).replace(/-/g, " ")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment