I am trying to use Jquery’s .get function (below) to return a simple text value, either 0 or 1 and turn that value into a variable. Here’s what I am trying
jQuery.get( url, [data,] [success(data, textStatus, jqXHR),] [dataType] )
with my url being myexternalsite.com/text.txt
can i use a text file to simply return either a 0 or 1 and how do I make this a variable?
Well if you’re running a callback function. just use the “data” of your callback function and set the variable you want e.g.
myvariable = data