javascript - Get content from raw.github and displaying on website -
i allowing members of community put information want on web page made them, wondering if possible allow user use rawgitub (which displays text) , use them change info @ will.
looking around similar this, found following, however, seems not work. idea doing wrong?
<script type="text/javascript">settimeout('read',30);function read(){ jquery.get('https://raw.githubusercontent.com/jordsta95/arcanearteries/master/aaversion.txt',function(data){document.write(data);});}</script>
you passing string settimeout, should function or reference function:
settimeout(function read(){ $.get('https://raw.githubusercontent.com/jordsta95/arcanearteries/master/aaversion.txt', function(data){ document.write(data); } ); }, 30);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Comments
Post a Comment