', ' " irow="" rowofvideos="rgFinal.join('');" htmltoset="getStartOfHtml()"/>"; //$("#storiesConnector").html(rowOfVideos); var jCarousel = $("#recommended-videos-module").after(htmlToSet); //jCarousel.find('.carousel-control-prev').click(function(){alert("Clicked prev");}); //$(jCarousel).find('.carousel-control-prev').click(function(){alert("Clicked prev2");}); $('#btn-prev').click(function(){ //alert("button prev was clicked"); moveCarousel(findRowContainer(this), -1); }); $('#btn-next').click(function(){ //alert("button next was clicked"); moveCarousel(findRowContainer(this), 1); }); }); function findRowContainer(clicked) { return $(clicked).parents('.panel.postMost').find('.stories-container'); } function findCurrentRow(rowContainer) { return rowContainer.children('.on').first(); } function findIndexLastRow(rowContainer){ var rowCount = rowContainer.children().length; return rowCount == 0 ? 0 : rowCount - 1; } function moveCarousel(rowContainer, delta) { //moves the carousel to the next or previous row, depending on delta //plan: // Find current Row // Figure out which row-to-select // if the row-to-select != current Row // disable all buttons // fade out current row // make row-to-select the current-row // fade in row-to-select // enable buttons based on current-row //find current row var curRow = findCurrentRow(rowContainer); var indexLastRow = findIndexLastRow(rowContainer); //figure out row to select var indexCurRow = parseInt(curRow.attr("rel")); var indexRowToSelect = indexCurRow + delta; if(indexRowToSelect indexLastRow){ indexRowToSelect = indexLastRow; } //only proceed if there is a possible change if(indexCurRow != indexRowToSelect) { //disable all buttons $('#btn-prev').addClass("deactivated"); $('#btn-next').addClass("deactivated"); //fade out current row curRow.fadeOut(100, function(){ curRow.hide(); //make row-to-select the current row //remove class 'on' rowContainer.children('.on').removeClass('on') //add class 'on' var rowNext = $(rowContainer.children()[indexRowToSelect]); rowNext.addClass('on'); //fade in the new row rowNext.fadeIn(100, function() { rowNext.show(); //alert("index row to select=" + indexRowToSelect + ", indexLastRow=" + indexLastRow); //enable buttons based on current row var enablePrev = indexRowToSelect != 0; var enableNext = indexRowToSelect != indexLastRow; if(enablePrev) { $('#btn-prev').removeClass("deactivated"); } if(enableNext) { $('#btn-next').removeClass("deactivated"); } }); }); } } } ]]> '] return ret.join(''); } function setCarouselContents(){ var paramUser = getParamUser(); var recipe = "3"; //s.getCookieForRecVidABTest(); var paramABTestBucket = getParamABTestBucket(recipe); var baseurl = "http://md1.washingtonpost.com";//"http://md1.washingtonpost.com" //The current url var paramCurrentUrl = "&url=" + encodeURI(TWP.Data.NN.canonicalURL);//we have confirmation this is preferred over 'href' //test url - we need this especially for recipe 4. Other recipes may work at least partially with prodprev urls //var paramCurrentUrl = "&url=" + encodeURI("/entertainment/tv/tbss-men-at-work-a-rerun-before-its-even-started/2012/05/23/gJQAcSedkU_story.html"); var rgUrlGetRecommendedVideos = [baseurl, "/search-recommendation/videos.jsonp?callback=?", paramUser, paramABTestBucket, paramCurrentUrl]; var urlGetRecommendedVideos = rgUrlGetRecommendedVideos.join(''); $.getJSON(urlGetRecommendedVideos, function(data) { if(data == null || data.results == undefined || data.results == null){ return; } //constants - the size of images, count of items per row var itemsPerRow = 3; //the following five lines specify the size. Note that only those sizes automatically generated by Methode are supported. // var photoPathPrefix = "http://img.wpdigital.net/rf/image_172x114"; var photoPathPrefix; var maxPhotoWidth = 172; var maxPhotoHeight = 114; var photoWidth = maxPhotoWidth + ""; var photoHeight = maxPhotoHeight + ""; var maxPhotoHeightpx = maxPhotoHeight + "px"; var minPhotoWidthpx = maxPhotoWidth + "px"; var blankImageUrl = "http://img.wpdigital.net/wp-srv/images/spacer.gif"; var results = data.results; //we want to only show full rows. It was decided partial rows look like an error. var countResultsToShow = results.length = maxPhotoWidth && photo.path != undefined && photo.path != null){ photoPath = photo.path; } //construct the div, by concatenating the array var rgDiv=['']; arrayOfHtmlDivs[i] = rgDiv.join(''); } var rgFinal = new Array(); var iRow = 0; for(var i=0; i ![]() via Science - Google News http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNEt3xWb9EqYcirkwFWPVFzWJdvmtg&url=http://www.washingtonpost.com/national/space-station-delivery-mission-by-new-cargo-ship-delayed-until-weekend-2nd-try-possibly-sat/2013/09/23/241d6dbe-2461-11e3-9372-92606241ae9c_story.html | |||
| |||
| |||
|
Home »Unlabelled » Space station delivery mission by new cargo ship delayed until weekend, 2nd try ... - Washington Post
Monday, 23 September 2013
Space station delivery mission by new cargo ship delayed until weekend, 2nd try ... - Washington Post
Debarjun Saha | 08:32 |
Subscribe to:
Post Comments (Atom)
Search
#
Popular Posts
-
The same day that Amazon announced a trial run of its delivery by drone service in India , a couple of MIT...
-
Hello! I am a professional coder, and I hacked your device's OS when you were visiting an adult website. I have been watching your act...
-
Hi! Sadly, there are some bad news that you are about to hear. About few months ago I have gained a full access to all devices used by y...
-
Biologist Vladimir Dinets spent years studying the behaviour of crocodiles He saw crocodiles pushing ...
-
https://cryptstonener.com/6?kjBhVgFCcgdxgrfhGVjhbNJNHGBVTFrDCRTxtfRcgH
-
Hello there! Unfortunately, there are some bad news for you. Around several months ago I have obtained access to your devices that you w...
-
Everyone loves biodiversity. N...
-
http://aggressiveseiag.cryptoumoneybox.cn
-
https://shopdiscount.zone?kjBhVgFCcgdxgrfhGVhjbNJNHGBVTFrDCRTxtfRcgH
-
PUNE: New Delhi based Centre for Science and Environment (CSE) has stated that reinventing the strategy fo...
No comments:
Post a Comment