SLIDESHOW: Black Lives Matter Rally takes place at the Beverly City Hall – The Salem News

'; oEngagementContainer_84964226_d12d_11ea_84ab_b36b0d98c94f.append(sHTML_84964226_d12d_11ea_84ab_b36b0d98c94f); } }); } // Build engagement set $.each(oResponse.assets, function(index) { if (index == 1 && sOriginID_84964226_d12d_11ea_84ab_b36b0d98c94f == null) { sOriginID_84964226_d12d_11ea_84ab_b36b0d98c94f = oResponse.assets[0].id; } // Display assets once origin is found // Find origin then begin displaying assets if (bFoundOrigin_84964226_d12d_11ea_84ab_b36b0d98c94f == true) { if (this.id == sOriginID_84964226_d12d_11ea_84ab_b36b0d98c94f) { // Found orgin a second time. Stop gathering assets and kill next_url bStop_84964226_d12d_11ea_84ab_b36b0d98c94f = true; sNextUrl_84964226_d12d_11ea_84ab_b36b0d98c94f = null; oEngagementMore_84964226_d12d_11ea_84ab_b36b0d98c94f.remove(); } else if (bStop_84964226_d12d_11ea_84ab_b36b0d98c94f == false && this.id != '84964226-d12d-11ea-84ab-b36b0d98c94f') { // Display asset var sHTML_84964226_d12d_11ea_84ab_b36b0d98c94f = ''; if (this.content.includes('engagement-asset') && iDisplayCount_84964226_d12d_11ea_84ab_b36b0d98c94f ' + this.content + ''; } } } else { if (this.id == sOriginID_84964226_d12d_11ea_84ab_b36b0d98c94f) { // Origin found. Begin displaying assets bFoundOrigin_84964226_d12d_11ea_84ab_b36b0d98c94f = true; } else { // Origin found is false. Skip asset // Fail-safe in case origin is not present in set. This can be removed when origin is fixed. if (bFirstRun_84964226_d12d_11ea_84ab_b36b0d98c94f == true) { // Stored first id sFirstID_84964226_d12d_11ea_84ab_b36b0d98c94f = this.id; bFirstRun_84964226_d12d_11ea_84ab_b36b0d98c94f = false; } else if (this.id == sFirstID_84964226_d12d_11ea_84ab_b36b0d98c94f) { // We've started again. Force origin sOriginID_84964226_d12d_11ea_84ab_b36b0d98c94f = sFirstID_84964226_d12d_11ea_84ab_b36b0d98c94f; bFoundOrigin_84964226_d12d_11ea_84ab_b36b0d98c94f = true; } // end Fail-safe } } // Append engagement assets to container oEngagementContainer_84964226_d12d_11ea_84ab_b36b0d98c94f.append(sHTML_84964226_d12d_11ea_84ab_b36b0d98c94f); // Stop traversing asset array if (iDisplayCount_84964226_d12d_11ea_84ab_b36b0d98c94f >= iMaxDisplay_84964226_d12d_11ea_84ab_b36b0d98c94f) { bStop_84964226_d12d_11ea_84ab_b36b0d98c94f = true; return false; } }); // Include block_id on newly added list items oEngagementContainer_84964226_d12d_11ea_84ab_b36b0d98c94f.find('.engagement-item.original').each(function() { var sHref_84964226_d12d_11ea_84ab_b36b0d98c94f = scrubURL($(this).find("a.centered-content-link").attr("href")); if(sHref_84964226_d12d_11ea_84ab_b36b0d98c94f!="javascript:void(0)"){ // Add content discovery tracking sHref_84964226_d12d_11ea_84ab_b36b0d98c94f += '#tncms-source=endcard-gallery'; // Add to image and headlines links $(this).removeClass('original').find("a.centered-content-link").attr("href", sHref_84964226_d12d_11ea_84ab_b36b0d98c94f); } }); // Check next URL if (sNextUrl_84964226_d12d_11ea_84ab_b36b0d98c94f && bStop_84964226_d12d_11ea_84ab_b36b0d98c94f == false) { // if origin hasn't been found yet and we hit next_url. Trigger the set to pull in again. if (bFoundOrigin_84964226_d12d_11ea_84ab_b36b0d98c94f == false) { // No origin yet. Call the populate function __tnt.engagement.assets["84964226-d12d-11ea-84ab-b36b0d98c94f"].populate(sNextUrl_84964226_d12d_11ea_84ab_b36b0d98c94f); } else { // Append sNextUrl_84964226_d12d_11ea_84ab_b36b0d98c94f to engagement set oEngagementContainer_84964226_d12d_11ea_84ab_b36b0d98c94f.append(''); if (iDisplayCount_84964226_d12d_11ea_84ab_b36b0d98c94f

Read more:

SLIDESHOW: Black Lives Matter Rally takes place at the Beverly City Hall - The Salem News

Related Posts

Comments are closed.