javascript - Trouble with Autolinker.js: Cannot read property 'assign' of undefined -
i'm using greg jacob's autolinker.js on twitter api call. no matter place code autolinker.link() code can't seem work. i've tried passing string variable , more defined document...innerhtml , neither seem work. here's code stands now:
<blockquote id="tweets"></blockquote> <script src="autolinker.js"></script> <script> // api call function tweetsapi( data ) { var tweets = data.statuses.length; var n = math.floor(math.random() * ((tweets - 1) - 0 + 1)) + 0; var string = data.statuses[n].text + other twitter data; document.getelementbyid("tweets").innerhtml = string; document.getelementbyid("tweets").innerhtml = autolinker.link(document.getelementbyid("tweets").innerhtml); } </script>
shouldn't data defined time autolinker.js picks up?
odd, using minified version of code fixed problem.
Comments
Post a Comment