Created
November 17, 2012 22:15
-
-
Save whoeverest/4100682 to your computer and use it in GitHub Desktop.
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
$(function(){ | |
$("div#mw-content-text a").mouseover(function(){ | |
var new_link_title = "This needs to be changed."; | |
$.get(this.href, function(data){ | |
var description_html = $(data).find('div#mw-content-text p')[0]; | |
new_link_title = $(description_html).text(); // this assignment doesn't work | |
}) | |
this.title = new_link_title; // link title is undefined here | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment