SlideShare a Scribd company logo
1 of 11
Download to read offline
Technology and Science News - ABC News 
" 
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=15691212&twOverride=&lpos='+newsbulle 
tin.lpos+'&section=&'+nbjsId) 
//to try and handle caching in webkit browsers 
dynamicJS.load('newsBulletin'+nbjsId, 
newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&twOverride=&lpos='+newsbulletin.lpo 
s2+'&section=&'+nbjsId); 
//dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505' 
); 
//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 is not 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;'; 
else 
if(nbItemObj.author == null 
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 != '') this.notetwitter != '') 
this.notesocial = this.notefb + this.notetwitter; 
this.noteSocialStyle = ' style="height:21px; padding: 2px 0px;"'; 
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 old item height 
var oldItemHeight = $('#nbItem_'+id).height();
//retrieve the content from the array 
$('#text_'+id).html(contentObject[id]) 
//store id a 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 if the header link is loaded 
isShareLinkLoaded = false; // flag to check if the share link is loaded
isDoneLoading = false; // flag to check if the html is done loading in 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 > .twitterContent").append("" + 
twitterImg + ""); 
isHeaderLinkLoaded = true; 
//clear the author cutouts array 
newsbulletin.authorCutouts = []; 
// check to see if there is a height set for 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 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; 
//set defaults if item 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's not displayed in any of the items 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 value pair list of id/text 
contentObject[itemDetails.id] = itemDetails.text 
itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? true : false; 
//build markup 
$("#nbItemContainer").append(newsbulletin.displayItems(itemDetails)); 
); 
$("#nbItemContainer").append(''); 
//set the height of 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 solid #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=15691212&'+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 could call "pane.jScrollPane(settings)" again but it is 
// more convenient to call via the API as then the original 
// settings we passed in are automatically remembered. 
// Initialization of the container should be done after all the markup has been loaded 
// since there is no listener that could be passed into reinitialise() for callback
if (isDoneLoading) 
window.api.reinitialise(); 
isDoneLoading = false; 
, 5000); 
; 
addOnload(newsbulletin.load());

More Related Content

What's hot

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 Coveragecoldfascism4997
 
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 Coveragecreepypreview6376
 
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 Coverageroastedrecluse128
 
Business News, Personal Finance and Money News
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money Newseminentoomph4388
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC Newsdynamicindividu85
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsenchantingsched84
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsracialgimmick716
 
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 Coverageerna8nielsen65
 
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 Coveragebrendacuthbert89
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National Newscoldpoet326
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newspainstakingsled66
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newspainstakingsled66
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsmaddeningwareho91
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newscafresno51
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newstalloration5719
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newswonderfulshuttl70
 
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 Coverageawarequalm2586
 

What's hot (20)

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
 
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
 
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
 
Business News, Personal Finance and Money News
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money News
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
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
 
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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 

Similar to ABC News - Latest Science and Tech Developments

U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National Newsalertchair8725
 
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 Coveragematureocclusion27
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsalertchair8725
 
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 Coverageexcitedfoyer2246
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsoceanicrainbow854
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsnumberlesspasto93
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesalertchair8725
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesnumberlesspasto93
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsjoblessbeach6696
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newshonorablejourna10
 
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 Coverageexoticshame065
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinedemonicrhythm3717
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinealertmishap944
 
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 Coveragecoldmiscellany992
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsproductiveengin27
 
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
 

Similar to ABC News - Latest Science and Tech Developments (18)

U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
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
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
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
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
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
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
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
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
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
 

More from boorishvictim1493

Archive News & Video for Tuesday, 06 Mar 2012
Archive News & Video for Tuesday, 06 Mar 2012Archive News & Video for Tuesday, 06 Mar 2012
Archive News & Video for Tuesday, 06 Mar 2012boorishvictim1493
 
Monterey County News Angles Spring 2015 | Reuters
Monterey County News Angles Spring 2015
| ReutersMonterey County News Angles Spring 2015
| Reuters
Monterey County News Angles Spring 2015 | Reutersboorishvictim1493
 
Swedish Massages for Rabbits and Other Taxpayer Expenses You Will Not Believe
Swedish Massages for Rabbits and Other Taxpayer Expenses You Will Not BelieveSwedish Massages for Rabbits and Other Taxpayer Expenses You Will Not Believe
Swedish Massages for Rabbits and Other Taxpayer Expenses You Will Not Believeboorishvictim1493
 
Therapeutic massage Therapy South Africa
Therapeutic massage Therapy South Africa
Therapeutic massage Therapy South Africa
Therapeutic massage Therapy South Africa boorishvictim1493
 
is massage therapy a good career choice ?
is massage therapy a good career choice ?is massage therapy a good career choice ?
is massage therapy a good career choice ?boorishvictim1493
 
Pool Safety Inspector Courses
Pool Safety Inspector CoursesPool Safety Inspector Courses
Pool Safety Inspector Coursesboorishvictim1493
 
What is the best course to study Reflexology?
What is the best course to study Reflexology?What is the best course to study Reflexology?
What is the best course to study Reflexology?boorishvictim1493
 
Reflexology for Fibromyalgia
Reflexology for FibromyalgiaReflexology for Fibromyalgia
Reflexology for Fibromyalgiaboorishvictim1493
 
Distinct Termalogy Of Search Engine Marketing
Distinct Termalogy Of Search Engine MarketingDistinct Termalogy Of Search Engine Marketing
Distinct Termalogy Of Search Engine Marketingboorishvictim1493
 
What Is Behavioral Targeting? - CBS News
What Is Behavioral Targeting? - CBS NewsWhat Is Behavioral Targeting? - CBS News
What Is Behavioral Targeting? - CBS Newsboorishvictim1493
 
Web Outsourcing Gateway - Gather.com : Gather.com
Web Outsourcing Gateway - Gather.com : Gather.comWeb Outsourcing Gateway - Gather.com : Gather.com
Web Outsourcing Gateway - Gather.com : Gather.comboorishvictim1493
 
SEO versus SEM - Gather.com : Gather.com
SEO versus SEM - Gather.com : Gather.comSEO versus SEM - Gather.com : Gather.com
SEO versus SEM - Gather.com : Gather.comboorishvictim1493
 
Seo surges into lead, Wie lurking at La Costa
Seo surges into lead, Wie lurking at La CostaSeo surges into lead, Wie lurking at La Costa
Seo surges into lead, Wie lurking at La Costaboorishvictim1493
 
internet marketing | Examiner.com
internet marketing | Examiner.cominternet marketing | Examiner.com
internet marketing | Examiner.comboorishvictim1493
 
Internet marketing: software for the hard sell.
Internet marketing: software for the hard sell.Internet marketing: software for the hard sell.
Internet marketing: software for the hard sell.boorishvictim1493
 
The History of Internet Marketing
The History of Internet MarketingThe History of Internet Marketing
The History of Internet Marketingboorishvictim1493
 

More from boorishvictim1493 (20)

Archive News & Video for Tuesday, 06 Mar 2012
Archive News & Video for Tuesday, 06 Mar 2012Archive News & Video for Tuesday, 06 Mar 2012
Archive News & Video for Tuesday, 06 Mar 2012
 
Monterey County News Angles Spring 2015 | Reuters
Monterey County News Angles Spring 2015
| ReutersMonterey County News Angles Spring 2015
| Reuters
Monterey County News Angles Spring 2015 | Reuters
 
Swedish Massages for Rabbits and Other Taxpayer Expenses You Will Not Believe
Swedish Massages for Rabbits and Other Taxpayer Expenses You Will Not BelieveSwedish Massages for Rabbits and Other Taxpayer Expenses You Will Not Believe
Swedish Massages for Rabbits and Other Taxpayer Expenses You Will Not Believe
 
Therapeutic massage Therapy South Africa
Therapeutic massage Therapy South Africa
Therapeutic massage Therapy South Africa
Therapeutic massage Therapy South Africa
 
is massage therapy a good career choice ?
is massage therapy a good career choice ?is massage therapy a good career choice ?
is massage therapy a good career choice ?
 
Internet Beauty Classes
Internet Beauty ClassesInternet Beauty Classes
Internet Beauty Classes
 
Pool Safety Inspector Courses
Pool Safety Inspector CoursesPool Safety Inspector Courses
Pool Safety Inspector Courses
 
What is the best course to study Reflexology?
What is the best course to study Reflexology?What is the best course to study Reflexology?
What is the best course to study Reflexology?
 
Reflexology for Fibromyalgia
Reflexology for FibromyalgiaReflexology for Fibromyalgia
Reflexology for Fibromyalgia
 
Yahoo
YahooYahoo
Yahoo
 
Distinct Termalogy Of Search Engine Marketing
Distinct Termalogy Of Search Engine MarketingDistinct Termalogy Of Search Engine Marketing
Distinct Termalogy Of Search Engine Marketing
 
What Is Behavioral Targeting? - CBS News
What Is Behavioral Targeting? - CBS NewsWhat Is Behavioral Targeting? - CBS News
What Is Behavioral Targeting? - CBS News
 
Web Outsourcing Gateway - Gather.com : Gather.com
Web Outsourcing Gateway - Gather.com : Gather.comWeb Outsourcing Gateway - Gather.com : Gather.com
Web Outsourcing Gateway - Gather.com : Gather.com
 
SEO versus SEM - Gather.com : Gather.com
SEO versus SEM - Gather.com : Gather.comSEO versus SEM - Gather.com : Gather.com
SEO versus SEM - Gather.com : Gather.com
 
Two Sides of a Coin?
Two Sides of a Coin?Two Sides of a Coin?
Two Sides of a Coin?
 
Seo surges into lead, Wie lurking at La Costa
Seo surges into lead, Wie lurking at La CostaSeo surges into lead, Wie lurking at La Costa
Seo surges into lead, Wie lurking at La Costa
 
Yahoo
YahooYahoo
Yahoo
 
internet marketing | Examiner.com
internet marketing | Examiner.cominternet marketing | Examiner.com
internet marketing | Examiner.com
 
Internet marketing: software for the hard sell.
Internet marketing: software for the hard sell.Internet marketing: software for the hard sell.
Internet marketing: software for the hard sell.
 
The History of Internet Marketing
The History of Internet MarketingThe History of Internet Marketing
The History of Internet Marketing
 

ABC News - Latest Science and Tech Developments

  • 1. Technology and Science News - ABC News " 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=15691212&twOverride=&lpos='+newsbulle tin.lpos+'&section=&'+nbjsId) //to try and handle caching in webkit browsers dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&twOverride=&lpos='+newsbulletin.lpo s2+'&section=&'+nbjsId); //dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505' ); //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 is not expanded display capped text if applicable if(nbItemObj.isExpanded != true)
  • 3. 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 != '')
  • 4. this.textStyle = ' style=width:208px;'; else if(nbItemObj.author == null 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 != '')
  • 5. this.notebio = ''+nbNote.noteAuthor.name+'' this.noteAuthorBlock = ' '+this.notebio+' ' this.notesocial = ''; this.noteSocialStyle = ''; if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '') this.notetwitter != '') this.notesocial = this.notefb + this.notetwitter; this.noteSocialStyle = ' style="height:21px; padding: 2px 0px;"'; 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 old item height var oldItemHeight = $('#nbItem_'+id).height();
  • 6. //retrieve the content from the array $('#text_'+id).html(contentObject[id]) //store id a 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 if the header link is loaded isShareLinkLoaded = false; // flag to check if the share link is loaded
  • 7. isDoneLoading = false; // flag to check if the html is done loading in 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 > .twitterContent").append("" + twitterImg + ""); isHeaderLinkLoaded = true; //clear the author cutouts array newsbulletin.authorCutouts = []; // check to see if there is a height set for 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();
  • 8. 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; //set defaults if item 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's not displayed in any of the items yet if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1) itemDetails.authorimage = it.author.image; //add to ignore list
  • 9. 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 value pair list of id/text contentObject[itemDetails.id] = itemDetails.text itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? true : false; //build markup $("#nbItemContainer").append(newsbulletin.displayItems(itemDetails)); ); $("#nbItemContainer").append(''); //set the height of 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 solid #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");
  • 10. clearTimeout(timeoutId); , 3000); dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&'+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 could call "pane.jScrollPane(settings)" again but it is // more convenient to call via the API as then the original // settings we passed in are automatically remembered. // Initialization of the container should be done after all the markup has been loaded // since there is no listener that could be passed into reinitialise() for callback
  • 11. if (isDoneLoading) window.api.reinitialise(); isDoneLoading = false; , 5000); ; addOnload(newsbulletin.load());