public
Last active

Suggestion for XKCD to allow people who are using touch screens to view the Tittle attribute.

  • Download Gist
icanhaztitle.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12
/* I'm lazy - I'll use jQuery. */
var script = document.createElement('script');
script.src = 'http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
 
/* If someone clicks the image - display the title attribute for them. */
jQuery( '#middleContent .bd img' ).click(
function() {
alert( jQuery( '#middleContent .bd img' ).attr( 'title' ) );
}
);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.