javascript - variable suddenly returns 'undefined' -
my variable directlinks gives me 'undefined' in chrome's javascript console when used inside console.log
able work in 2 other occasions can see below.
if (jquery(this).isonscreen() === true && directlinks.text() === "www.example.com") { jquery.ajax( { url: directlinks.attr("href").replace("www.", ""), aysnc: false, }) .done(function(data) { console.log(directlinks.attr("href")); var test = jquery(data).find("#left").children().children("div").eq(2).children("p").eq(1).children("a").attr("href"); directlinks.attr("href", test); }); }
Comments
Post a Comment