SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
Politics News and U.S. Elections Coverage
"
newsbulletin.nbFooter = ""
//append widget header
$("#newsbulletin > .midcontainer").append("");
$("#newsbulletin > .midcontainer").append(newsbulletin.nbContainer);
$("#newsbulletin > .midcontainer").append(newsbulletin.nbFooter);
newsbulletin.nbDiv = document.getElementById('nbItemContainer');
nbjsId = 0;
newsbulletin.load = function()
//alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&twOverride=&lpos='+newsbulle
tin.lpos+'&section=&'+nbjsId)
//to try and handle caching inside webkit browsers
dynamicJS.load('newsBulletin'+nbjsId,
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&twOverride=&lpos='+newsbulletin.lpo
s2+'&section=&'+nbjsId);
//dynamicJS.load('newsBulletin','http://newspreview.corp.dig.com/xmldata/newsbulletin?id=1356450
5');
//display items
newsbulletin.displayItems = function(nbItemObj)
//check if status update
this.isStatusUpdate = (nbItemObj.label == 'Status Update')?true:false;
//item type class
this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue';
//bg position
this.itemBgPos = '100% 55%';
if(nbItemObj.bgPos != null)
this.itemBgPos = nbItemObj.bgPos;
//author image
this.nbItemStyle = '';
this.nbH4Class = 'class=nbheader';
this.nbH4Style = '';
this.nbItemStyleAuthor = '';
if(nbItemObj.authorimage != null && nbItemObj.authorimage != '')
this.nbH4Style = ' style=width:210px;';
this.nbItemStyle = 'background:url('+nbItemObj.authorimage+') no-repeat bottom right'//+
this.itemBgPos;
this.nbItemStyleAuthor = ' nbItemContentsAuthor'
//title
this.title = '
'+nbItemObj.title+'
';
if(nbItemObj.link != null && nbItemObj.link != '')
this.title = ''
//text
this.text = '';
this.textCapped = '';
this.morelink = 'More'
if(nbItemObj.text != null)
this.text = nbItemObj.text;
//if item isn't expanded display capped text if applicable
if(nbItemObj.isExpanded != true)
if(nbItemObj.text.length > 63)
this.textCapped = nbItemObj.text.substring(0, 63);
this.text = this.textCapped + '...';
if(this.isStatusUpdate)
this.text = this.textCapped + '... ' + this.morelink;
//social
this.social = '';
this.socialStyle = '';
this.authorBlock = '';
this.divider = '';
this.fb = '';
if(nbItemObj.authorfb != null && nbItemObj.authorfb != '')
this.fb = ''
this.twitter = '';
if(nbItemObj.authortwitter != null && nbItemObj.authortwitter != '')
this.twitter = ''
this.bio = '';
if(nbItemObj.authorbio != null && nbItemObj.authorbio != '')
this.bio = ''+nbItemObj.author+''
this.authorBlock = '
'+this.bio+'
'
if(nbItemObj.author != null && nbItemObj.author != '')else
this.social = '';
this.textStyle = '';
if(nbItemObj.authorimage != null && nbItemObj.authorimage != '')
this.textStyle = ' style=width:208px;';
in addition nbItemObj.author == '')
this.textStyle = ' style="padding-bottom:2px; margin-bottom:5px;"';
this.categoryTag = '';
this.nbTextOverride = '';
this.rowTemp = ''+this.authorBlock+'
'+nbItemObj.date+'
'+this.title+'
'+this.text+'
'+this.social+'
';
if (nbItemObj.notes)
nbNotes = nbItemObj.notes;
nbNoteStr = '';
nbNoteDivider = '';
$.each(nbNotes, function(idx)
nbNote = nbNotes[idx];
this.noteAuthorBlock = '';
this.notefb = '';
if(nbNote.noteAuthor.facebook != null && nbNote.noteAuthor.facebook != '')
this.notefb = ''
this.notetwitter = '';
if(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '')
this.notetwitter = ''
this.notebio = '';
if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '')
this.notebio = ''+nbNote.noteAuthor.name+''
this.noteAuthorBlock = '
'+this.notebio+'
'
this.notesocial = '';
this.noteSocialStyle = '';
if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')else
this.notesocial = '';
if (idx == nbNotes.length-1)
nbNoteDivider = '';
this.nbNoteDiv = '
'+nbNote.noteHeadline+'
'+this.noteAuthorBlock+'
'+nbNote.noteOverview+'
'+this.notesocial+'
';
nbNoteStr += this.nbNoteDiv;
);
this.rowTemp += nbNoteStr;
return this.rowTemp;
function showMoreText(id)
//grab outdated merchandise height
var oldItemHeight = $('#nbItem_'+id).height();
//retrieve your content in the array
$('#text_'+id).html(contentObject[id])
//store id the list of opened objects
fullTextList.push(id.toString());
var newContainerHeight = $("#nbItemContainer").height() + ($('#nbItem_'+id).height()-
oldItemHeight);
$("#nbItemContainer").css('height', newContainerHeight);
//reinitialize scroll
window.api.reinitialise();
lastNBObjStr = '';
function isNewData(data)
isNewTemp = false;
currNBObjStr = '';
$.each(data.updates, function(ind)
currNBObjStr = currNBObjStr + data.updates[ind].objId + data.updates[ind].date;
);
//console.log('x'+currNBObjStr);
//console.log('y'+lastNBObjStr);
if(currNBObjStr != lastNBObjStr)
isNewTemp = true;
else
//console.log('no refresh');
lastNBObjStr = currNBObjStr;
return isNewTemp;
isHeaderLinkLoaded = false; // flag to check on if the header hyperlink can be loaded
isShareLinkLoaded = false; // flag to check in the large event the share hyperlink can be loaded
isDoneLoading = false; // flag to test when the html is performed loading inside the jScrollPane
function newsBulletin(data)
if(data)
isNewDataFlag = isNewData(data);
if(isNewDataFlag)
//clear contents first
newsbulletin.nbDiv.innerHTML = '';
//console.log('refresh');
updates = data.updates;
headerLink = data.widgetLink;
shareLink = data.shareLink;
if (headerLink != '' && headerLink != null && !isHeaderLinkLoaded)
var twitterImg = " "
$("#newsbulletin > .midcontainer > .widget_head").append("");
$("#newsbulletin > .midcontainer > .widget_head > .twitterLink a new >
.twitterContent").append("" + twitterImg + "");
isHeaderLinkLoaded = true;
//clear the writer cutouts array
newsbulletin.authorCutouts = [];
// examine to find out if there's a height set pertaining to container, if so clear it
// prevents cacheing
var hasHeight = $('#nbItemContainer').attr('style');
if (typeof hasHeight != 'undefined')
$('#nbItemContainer').removeAttr('style');
$.each(updates, function(ind)
var itemDetails = new Object();
it = updates[ind];
//populate your itemDetails object
itemDetails.id = it.objId;
itemDetails.title = it.title;
itemDetails.objType = it.objType;
itemDetails.link = it.link;
itemDetails.date = it.date;
itemDetails.label = it.label;
itemDetails.author = it.author.name;
itemDetails.authorbio = it.author.bio;
itemDetails.authorfb = it.author.facebook;
itemDetails.authortwitter = it.author.twitter;
itemDetails.feed = it.feed;
itemDetails.category = it.category;
//set defaults if merchandise is a status update
if(itemDetails.label == 'Status Update')
if(it.author.image == '')
it.author.image = 'http://a.abcnews.com/assets/images/abc_news_logo_84x84.png'
if(it.author.name == '')
itemDetails.author = 'ABC News'
itemDetails.authorfb = 'http://www.facebook.com/abcnews'
itemDetails.authortwitter = 'http://twitter.com/abc'
//only pass the author image if it can be not displayed
within some of the things yet
if($.inArray(it.author.image, newsbulletin.authorCutouts)
== -1)
itemDetails.authorimage = it.author.image;
//add to ignore list
if(it.author.image != '' &&($.inArray(it.author.image,
newsbulletin.authorCutouts) == -1))
newsbulletin.authorCutouts.push(it.author.image);
if(it.text != '')
itemDetails.text = it.text;
else
itemDetails.bgPos = 'bottom right';
if (it.notes)
itemDetails.notes = it.notes;
//build a name worth pair list of id/text
contentObject[itemDetails.id] = itemDetails.text
itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? correct : false;
//build markup
$("#nbItemContainer").append(newsbulletin.displayItems(itemDetails));
);
$("#nbItemContainer").append('');
//set the particular height involving container div
$("#nbItemContainer").css('height',$("#nbItemContainer").height());
if (shareLink != '' && shareLink != null && !isShareLinkLoaded)
$("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px solid
#d5d5d5", "border-bottom":"border-bottom:1px strong #eaeaea");
$("#newsbulletin > .midcontainer > .nbFooter").append("");
isShareLinkLoaded = true;
if($.browser.msie)
if ($.browser.version .midcontainer > .nbFooter").css("display":"none");
var timeoutId = setTimeout(function()
$("#newsbulletin > .midcontainer > .nbFooter").css("display":"block");
clearTimeout(timeoutId);
, 3000);
dynamicJS.unload('newsBulletin'+nbjsId,
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&'+nbjsId);
isDoneLoading = true;
if ($.browser.webkit)
if(nbjsId .midcontainer > .nbFooter").css("display":"none");
var timeoutId = setTimeout(function()
$("#newsbulletin > .midcontainer > .nbFooter").css("display":"block");
clearTimeout(timeoutId);
, 3000);
7500)
setInterval(
function()
window.api.getContentPane().html(
newsbulletin.load()
);
,
60000
);
setInterval(function()
// we're in the position to contact "pane.jScrollPane(settings)" once more however it is
// a lot more convenient to always be able to contact by approach of the actual API as then a original
// settings we passed in are usually immediately remembered.
// Initialization in the container ought to be done right after all the markup may be loaded
// since there will be certainly simply no listener that might be passed straight into reinitialise() for
callback
if (isDoneLoading)
window.api.reinitialise();
isDoneLoading = false;
, 5000);
;
addOnload(newsbulletin.load());
http://abcnews.go.com/Politics/

Más contenido relacionado

Destacado

Matematika Diskrit - 09 graf - 04
Matematika Diskrit - 09 graf - 04Matematika Diskrit - 09 graf - 04
Matematika Diskrit - 09 graf - 04KuliahKita
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragetalloration5719
 
High Connect S.A./ introduction
High Connect S.A./ introductionHigh Connect S.A./ introduction
High Connect S.A./ introductionTassos Tiniakos
 
Pasar Saham - 16 Support dan Resistance
Pasar Saham - 16 Support dan ResistancePasar Saham - 16 Support dan Resistance
Pasar Saham - 16 Support dan ResistanceKuliahKita
 
Kriptografi - Stream Cipher
Kriptografi - Stream CipherKriptografi - Stream Cipher
Kriptografi - Stream CipherKuliahKita
 
Eksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layoutEksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layoutKuliahKita
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newstalloration5719
 
mastery journey timeline
mastery journey timelinemastery journey timeline
mastery journey timelineErik Mooij
 
Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...
Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...
Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...Chloé Bois
 
Real Club de Golf el Prat
Real Club de Golf el PratReal Club de Golf el Prat
Real Club de Golf el Pratjwebelliott
 

Destacado (15)

Matematika Diskrit - 09 graf - 04
Matematika Diskrit - 09 graf - 04Matematika Diskrit - 09 graf - 04
Matematika Diskrit - 09 graf - 04
 
Digital Citizenship
Digital CitizenshipDigital Citizenship
Digital Citizenship
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Osterhoudt vacation
Osterhoudt vacationOsterhoudt vacation
Osterhoudt vacation
 
High Connect S.A./ introduction
High Connect S.A./ introductionHigh Connect S.A./ introduction
High Connect S.A./ introduction
 
Pasar Saham - 16 Support dan Resistance
Pasar Saham - 16 Support dan ResistancePasar Saham - 16 Support dan Resistance
Pasar Saham - 16 Support dan Resistance
 
Kriptografi - Stream Cipher
Kriptografi - Stream CipherKriptografi - Stream Cipher
Kriptografi - Stream Cipher
 
Eksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layoutEksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layout
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Ruby女孩4/6
Ruby女孩4/6Ruby女孩4/6
Ruby女孩4/6
 
mastery journey timeline
mastery journey timelinemastery journey timeline
mastery journey timeline
 
Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...
Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...
Bringing Intelligence to Everything - ICI - Printability and Graphic Communic...
 
Ruby女孩3/6
Ruby女孩3/6Ruby女孩3/6
Ruby女孩3/6
 
Real Club de Golf el Prat
Real Club de Golf el PratReal Club de Golf el Prat
Real Club de Golf el Prat
 
Ruby女孩5/6
Ruby女孩5/6Ruby女孩5/6
Ruby女孩5/6
 

Politics News and U.S. Elections Coverage

  • 1. Politics News and U.S. Elections Coverage " newsbulletin.nbFooter = "" //append widget header $("#newsbulletin > .midcontainer").append(""); $("#newsbulletin > .midcontainer").append(newsbulletin.nbContainer); $("#newsbulletin > .midcontainer").append(newsbulletin.nbFooter); newsbulletin.nbDiv = document.getElementById('nbItemContainer'); nbjsId = 0; newsbulletin.load = function() //alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&twOverride=&lpos='+newsbulle tin.lpos+'&section=&'+nbjsId) //to try and handle caching inside webkit browsers dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&twOverride=&lpos='+newsbulletin.lpo s2+'&section=&'+nbjsId); //dynamicJS.load('newsBulletin','http://newspreview.corp.dig.com/xmldata/newsbulletin?id=1356450 5'); //display items newsbulletin.displayItems = function(nbItemObj) //check if status update this.isStatusUpdate = (nbItemObj.label == 'Status Update')?true:false; //item type class this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue'; //bg position this.itemBgPos = '100% 55%';
  • 2. if(nbItemObj.bgPos != null) this.itemBgPos = nbItemObj.bgPos; //author image this.nbItemStyle = ''; this.nbH4Class = 'class=nbheader'; this.nbH4Style = ''; this.nbItemStyleAuthor = ''; if(nbItemObj.authorimage != null && nbItemObj.authorimage != '') this.nbH4Style = ' style=width:210px;'; this.nbItemStyle = 'background:url('+nbItemObj.authorimage+') no-repeat bottom right'//+ this.itemBgPos; this.nbItemStyleAuthor = ' nbItemContentsAuthor' //title this.title = ' '+nbItemObj.title+' '; if(nbItemObj.link != null && nbItemObj.link != '') this.title = '' //text this.text = ''; this.textCapped = ''; this.morelink = 'More' if(nbItemObj.text != null) this.text = nbItemObj.text; //if item isn't expanded display capped text if applicable
  • 3. if(nbItemObj.isExpanded != true) if(nbItemObj.text.length > 63) this.textCapped = nbItemObj.text.substring(0, 63); this.text = this.textCapped + '...'; if(this.isStatusUpdate) this.text = this.textCapped + '... ' + this.morelink; //social this.social = ''; this.socialStyle = ''; this.authorBlock = ''; this.divider = ''; this.fb = ''; if(nbItemObj.authorfb != null && nbItemObj.authorfb != '') this.fb = '' this.twitter = ''; if(nbItemObj.authortwitter != null && nbItemObj.authortwitter != '') this.twitter = '' this.bio = ''; if(nbItemObj.authorbio != null && nbItemObj.authorbio != '') this.bio = ''+nbItemObj.author+'' this.authorBlock = ' '+this.bio+' ' if(nbItemObj.author != null && nbItemObj.author != '')else this.social = ''; this.textStyle = '';
  • 4. if(nbItemObj.authorimage != null && nbItemObj.authorimage != '') this.textStyle = ' style=width:208px;'; in addition nbItemObj.author == '') this.textStyle = ' style="padding-bottom:2px; margin-bottom:5px;"'; this.categoryTag = ''; this.nbTextOverride = ''; this.rowTemp = ''+this.authorBlock+' '+nbItemObj.date+' '+this.title+' '+this.text+' '+this.social+' '; if (nbItemObj.notes) nbNotes = nbItemObj.notes; nbNoteStr = ''; nbNoteDivider = ''; $.each(nbNotes, function(idx) nbNote = nbNotes[idx]; this.noteAuthorBlock = ''; this.notefb = ''; if(nbNote.noteAuthor.facebook != null && nbNote.noteAuthor.facebook != '') this.notefb = '' this.notetwitter = ''; if(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '') this.notetwitter = '' this.notebio = '';
  • 5. if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '') this.notebio = ''+nbNote.noteAuthor.name+'' this.noteAuthorBlock = ' '+this.notebio+' ' this.notesocial = ''; this.noteSocialStyle = ''; if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')else this.notesocial = ''; if (idx == nbNotes.length-1) nbNoteDivider = ''; this.nbNoteDiv = ' '+nbNote.noteHeadline+' '+this.noteAuthorBlock+' '+nbNote.noteOverview+' '+this.notesocial+' '; nbNoteStr += this.nbNoteDiv; ); this.rowTemp += nbNoteStr; return this.rowTemp; function showMoreText(id) //grab outdated merchandise height var oldItemHeight = $('#nbItem_'+id).height(); //retrieve your content in the array $('#text_'+id).html(contentObject[id])
  • 6. //store id the list of opened objects fullTextList.push(id.toString()); var newContainerHeight = $("#nbItemContainer").height() + ($('#nbItem_'+id).height()- oldItemHeight); $("#nbItemContainer").css('height', newContainerHeight); //reinitialize scroll window.api.reinitialise(); lastNBObjStr = ''; function isNewData(data) isNewTemp = false; currNBObjStr = ''; $.each(data.updates, function(ind) currNBObjStr = currNBObjStr + data.updates[ind].objId + data.updates[ind].date; ); //console.log('x'+currNBObjStr); //console.log('y'+lastNBObjStr); if(currNBObjStr != lastNBObjStr) isNewTemp = true; else //console.log('no refresh'); lastNBObjStr = currNBObjStr; return isNewTemp; isHeaderLinkLoaded = false; // flag to check on if the header hyperlink can be loaded isShareLinkLoaded = false; // flag to check in the large event the share hyperlink can be loaded isDoneLoading = false; // flag to test when the html is performed loading inside the jScrollPane function newsBulletin(data)
  • 7. if(data) isNewDataFlag = isNewData(data); if(isNewDataFlag) //clear contents first newsbulletin.nbDiv.innerHTML = ''; //console.log('refresh'); updates = data.updates; headerLink = data.widgetLink; shareLink = data.shareLink; if (headerLink != '' && headerLink != null && !isHeaderLinkLoaded) var twitterImg = " " $("#newsbulletin > .midcontainer > .widget_head").append(""); $("#newsbulletin > .midcontainer > .widget_head > .twitterLink a new > .twitterContent").append("" + twitterImg + ""); isHeaderLinkLoaded = true; //clear the writer cutouts array newsbulletin.authorCutouts = []; // examine to find out if there's a height set pertaining to container, if so clear it // prevents cacheing var hasHeight = $('#nbItemContainer').attr('style'); if (typeof hasHeight != 'undefined') $('#nbItemContainer').removeAttr('style'); $.each(updates, function(ind) var itemDetails = new Object(); it = updates[ind]; //populate your itemDetails object
  • 8. itemDetails.id = it.objId; itemDetails.title = it.title; itemDetails.objType = it.objType; itemDetails.link = it.link; itemDetails.date = it.date; itemDetails.label = it.label; itemDetails.author = it.author.name; itemDetails.authorbio = it.author.bio; itemDetails.authorfb = it.author.facebook; itemDetails.authortwitter = it.author.twitter; itemDetails.feed = it.feed; itemDetails.category = it.category; //set defaults if merchandise is a status update if(itemDetails.label == 'Status Update') if(it.author.image == '') it.author.image = 'http://a.abcnews.com/assets/images/abc_news_logo_84x84.png' if(it.author.name == '') itemDetails.author = 'ABC News'
  • 9. itemDetails.authorfb = 'http://www.facebook.com/abcnews' itemDetails.authortwitter = 'http://twitter.com/abc' //only pass the author image if it can be not displayed within some of the things yet if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1) itemDetails.authorimage = it.author.image; //add to ignore list if(it.author.image != '' &&($.inArray(it.author.image, newsbulletin.authorCutouts) == -1)) newsbulletin.authorCutouts.push(it.author.image); if(it.text != '') itemDetails.text = it.text; else itemDetails.bgPos = 'bottom right'; if (it.notes) itemDetails.notes = it.notes; //build a name worth pair list of id/text contentObject[itemDetails.id] = itemDetails.text itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? correct : false; //build markup $("#nbItemContainer").append(newsbulletin.displayItems(itemDetails)); ); $("#nbItemContainer").append(''); //set the particular height involving container div $("#nbItemContainer").css('height',$("#nbItemContainer").height());
  • 10. if (shareLink != '' && shareLink != null && !isShareLinkLoaded) $("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px solid #d5d5d5", "border-bottom":"border-bottom:1px strong #eaeaea"); $("#newsbulletin > .midcontainer > .nbFooter").append(""); isShareLinkLoaded = true; if($.browser.msie) if ($.browser.version .midcontainer > .nbFooter").css("display":"none"); var timeoutId = setTimeout(function() $("#newsbulletin > .midcontainer > .nbFooter").css("display":"block"); clearTimeout(timeoutId); , 3000); dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&'+nbjsId); isDoneLoading = true; if ($.browser.webkit) if(nbjsId .midcontainer > .nbFooter").css("display":"none"); var timeoutId = setTimeout(function() $("#newsbulletin > .midcontainer > .nbFooter").css("display":"block"); clearTimeout(timeoutId); , 3000); 7500) setInterval( function() window.api.getContentPane().html( newsbulletin.load() ); ,
  • 11. 60000 ); setInterval(function() // we're in the position to contact "pane.jScrollPane(settings)" once more however it is // a lot more convenient to always be able to contact by approach of the actual API as then a original // settings we passed in are usually immediately remembered. // Initialization in the container ought to be done right after all the markup may be loaded // since there will be certainly simply no listener that might be passed straight into reinitialise() for callback if (isDoneLoading) window.api.reinitialise(); isDoneLoading = false; , 5000); ; addOnload(newsbulletin.load()); http://abcnews.go.com/Politics/