Unable to check if jQuery var is undefined -


Here is my code that I tried:

  var moduleloaded = jQuery.data ( "#module", "load"); If (module loaded type === undefined) {moduleLoaded = true; JQuery data ("#module", "load", module loaded); Console.log (jQuery.data ("# module", "load", module loaded)); }  

If the statement does not get hit. I tried the if (module loaded!) and then I got the error 'can not read' the data of the "undefined 'property" if (module loaded == '') will also not work This code gets hit twice, so I should be correct on the second loop.

The operator returns a string, you can get it as 'undefined' string The value should be compared.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -