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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -