This document is a news bulletin from ABC News that provides technology and science news updates. It includes the headline, date, text and social sharing options for each news item. When notes are included, it also displays the note headline, author details and overview. Images and links are included for authors and social media profiles. The bulletin can be dynamically updated with new items and includes options to expand the text of each item.
Home and Garden | Home Improvement and Decorating Tipsshortguidebook822
Ìý
This document provides home improvement and decorating tips. It discusses Joseph Kellard's tips for home and garden projects as well as links to share content on social media. The document loads news bulletin items with titles, text, author information and notes and displays them in a scrolling container that can be reinitialized when new data is received.
This document discusses politics news and U.S. elections coverage from ABC News. It contains code for dynamically loading news bulletin items, displaying item details, and handling interactions like expanding text. The code also handles sharing links and checking for updated data.
This document is a news bulletin from ABC News that provides technology and science news updates. It includes the headline, date, text and social sharing options for each news item. When notes are included, it also displays the note headline, author details and overview. Images and links are included for authors and social media profiles. The bulletin can be dynamically updated with new items and includes options to expand the text of each item.
Home and Garden | Home Improvement and Decorating Tipsshortguidebook822
Ìý
This document provides home improvement and decorating tips. It discusses Joseph Kellard's tips for home and garden projects as well as links to share content on social media. The document loads news bulletin items with titles, text, author information and notes and displays them in a scrolling container that can be reinitialized when new data is received.
This document discusses politics news and U.S. elections coverage from ABC News. It contains code for dynamically loading news bulletin items, displaying item details, and handling interactions like expanding text. The code also handles sharing links and checking for updated data.
This document is a news bulletin from ABC News that provides technology and science news updates. It includes the headline, text snippet, author and date for each news item. It also includes options to share or see more of each item. The bulletin dynamically loads and displays the latest news updates using JavaScript.
This document is an article from the ABC News technology and science section. It discusses updates to their news bulletin widget, including updating the content and links displayed in the widget periodically. It also describes the code for displaying items, notes, and social media information for authors within the widget. The widget code handles checking for new data, loading and displaying items, and setting timeouts to prevent caching issues.
This document contains code for displaying news bulletins and updates on a website. It includes functions for loading new data from an API, displaying items in the bulletin with author information and social links, showing more text when an item is expanded, and reinitializing the content area when new data is received. Interval timers are also used to periodically refresh the content and check for updates.
6. return this.rowTemp;
function showMoreText(id)
//grab old item height
var oldItemHeight = $('#nbItem_'+id).height();
//retrieve the particular content material in the array
$('#text_'+id).html(contentObject[id])
//store id a listing 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;
7. );
//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 link will be loaded
isShareLinkLoaded = false; // flag to test when the reveal hyperlink is actually loaded
isDoneLoading = false; // flag to test in the big event the html is done loading within 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 the > .twitterContent").append(""
8. + twitterImg + "");
isHeaderLinkLoaded = true;
//clear the writer cutouts array
newsbulletin.authorCutouts = [];
// verify to ascertain if there can be a height set for container, in which case 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 the 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;
9. //set defaults if product 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 mcdougal image if it will be not displayed in some of the items yet
if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1)
itemDetails.authorimage = it.author.image;
//add in order 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 set of id/text
contentObject[itemDetails.id] = itemDetails.text
itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? correct : false;
//build markup
$("#nbItemContainer").append(newsbulletin.displayItems(itemDetails));
);
11. newsbulletin.load()
);
,
120000
);
setInterval(function()
// we could contact "pane.jScrollPane(settings)" once again but it is
// more convenient to call via the particular API as then the original
// adjustments we passed within are routinely remembered.
// Initialization of the container ought to be done after every 1 regarding the markup has been
loaded
// since there's simply no listener that will could be passed into reinitialise() for callback
if (isDoneLoading)
window.api.reinitialise();
isDoneLoading = false;
, 5000);
;
addOnload(newsbulletin.load());
http://abcnews.go.com/US/