javascript - Unique containers per tweet - Twitterapi Jason Mayes -


the goal here place each tweet within own unique container. want break out of box , scatter feeds anywhere on site.

here attempt @ this. although not work, gets overall goal across. again, using jason mayes twitter api.

thank you

var config5 = {   "id": 'xxxxxxxxxxx',   "domid": '',   "maxtweets": 12,   "enablelinks": true,   "showuser": false,   "showtime": true,   "datefunction": '',   "showretweet": false,   "customcallback": handletweets,   "showinteraction": false };  function handletweets(tweets) {     // loop data.     var items = [];     var results;     (i = 0; < tweets.length; i++) {         var tweets = [i];         results = this({             item = tweets[i]         });         items.push(results);     }     // insert tweets dom     $("#twitter1").html(items.slice(0, 1));     $("#twitter2").html(items.slice(1, 2));     $("#twitter3").html(items.slice(2, 3)); } 

a link work: http://jsfiddle.net/arkjoseph/a72ykcg5/6/

this should work now, have enable jquery in jsfiddle:

var config5 = {   "id": '624280239774961664',   "domid": '',   "maxtweets": 12,   "enablelinks": true,   "showuser": false,   "showtime": true,   "datefunction": '',   "showretweet": false,   "customcallback": handletweets,   "showinteraction": false };  function handletweets(tweets) {     //var x = tweets.length;     //var n = 0;     //var element = document.getelementbyid('page');       var items = [];     var results;      (i = 0; < tweets.length; i++) {         items.push(tweets[i]);     }     // insert tweets dom     $("#twitter1").html(items.slice(0, 1));     $("#twitter2").html(items.slice(1, 2));     $("#twitter3").html(items.slice(2, 3)); }  twitterfetcher.fetch(config5);  function dateformatter(date) {   return date.totimestring(); } 

jsfiddle: http://jsfiddle.net/cs6bydr7/


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -