Example 6 : Scroll Effect, JSON Data, Icon Seperator

<< Go Back to All Examples

  • Loading post from JSON file...

HTML STRUCTURE

				
<!-- DEMO6 HTML STARTS HERE *-->
<!-- *********************** -->
<div class="bn-breaking-news" id="newsTicker6">
	<div class="bn-news">
		<ul>
			<li><span class="bn-loader-text">Loading post from JSON file...</span></li>
		</ul>
	</div>
	<div class="bn-controls">
		<button><span class="bn-arrow bn-prev"></span></button>
		<button><span class="bn-action"></span></button>
		<button><span class="bn-arrow bn-next"></span></button>
	</div>
</div>
<!-- *********************** -->
<!-- DEMO6 HTML END HERE *** -->
				
			

JAVASCRIPT STRUCTURE

				
$(document).ready(function(){
			
	$('#newsTicker6').breakingNews({
		source: {
			type:'json',
			url:'https://jsonplaceholder.typicode.com/posts', 
			limit:20, 
			showingField:'title',
			linkEnabled: false,
			target:'_blank', 
			seperator: '<span class="bn-seperator" style="background-image:url(img/cnn-logo.png);"></span>',
			errorMsg: 'Json file not loaded. Please check the settings.'
		}
	});

});