Add Breaking News bar to your blogger sites


Breaking News is to survive of import for y'all if y'all desire to demo your recent weblog posts i yesteryear i inwards the recent posts bar.If y'all add together this pump inwards your blog,you'll run across your recent posts volition survive appered similar i yesteryear i similar javascript code.You tin flaming run across the effects yesteryear add together this pump on your site yesteryear your own.So,let's start.
Step1: Go to your Blogger Dashboard. Template > Edit HTML together with find </style>
Step2: Copy the below CSS Code together with Past Before </style>

#beakingnews{width:980px;margin:0 auto;line-height:35px;height:35px;background:#F7F7F7;overflow:hidden;margin-top:5px;} #beakingnews .tulisbreaking{display:block;float:left;padding:0 7px;margin:0 5px 0 0;color:#FFF;background:#FD1515} #recentpostbreaking{float:left} #recentpostbreaking ul,#recentpostbreaking li{list-style:none;margin:0;padding:0}
Step3: Now Past the below javascript before </body> tag.


<script type='text/javascript'> //<![CDATA[ $(document).ready(function () { var url_blog = 'YOUR URL HERE', //replace amongst your Domain      numpostx  = 10; //Posts desire to display $.ajax({     url: '' + url_blog + '/feeds/posts/default?alt=json-in-script&max-results=' + numpostx + '',     type: 'get',     dataType: "jsonp",     success: function(data) {         var posturl, posttitle, skeleton = '',             entry = data.feed.entry;         if (entry !== undefined) {             skeleton = "<ul>";         for (var i = 0; i < entry.length; i++) {                 for (var j=0; j < entry[i].link.length; j++)                 {                      if (entry[i].link[j].rel == "alternate")                         {                             posturl = entry[i].link[j].href;                             break;                          }                 }                posttitle = entry[i].title.$t;             skeleton += '<li><a href="' + posturl + '" target="_blank">' + posttitle + '</a></li>';         }             skeleton += '</ul>';             $('#recentpostbreaking').html(skeleton);             // kode untuk efek pada breaking tidings             business office tick(){             $('#recentpostbreaking li:first').slideUp( business office () { $(this).appendTo($('#recentpostbreaking ul')).slideDown(); });             }         setInterval(function(){ tick () }, 5000);         } else {             $('#recentpostbreaking').html('<span>No result!</span>');         }     },     error: function() {             $('#recentpostbreaking').html('<strong>Error Loading Feed!</strong>');        } }); }); //]]> </script>
Note: "YOUR URL HERE" edit the delineate of piece of work amongst your weblog url.

Step4: Now add together the below HTML Code where y'all desire demo this breaking tidings ticker. You also add together the below code on a HTML/Javascript Gadget.

<div id='beakingnews'><span class='tulisbreaking'>Breaking News:</span> <div id='recentpostbreaking'>Loading...</div> </div> <div style='clear: both;'/>
That's it. Now Save your template together with refresh your page together with run across the result.If y'all convey whatsoever occupation to laid this tool,you tin flaming comment below.I'll attention y'all yesteryear my best.

Search tags:
Add Breaking News bar to your blogger sites,Add Breaking News widget to your blogspot sites, Add Breaking News pump to your blogger sites,Add Breaking News to your blogger blogspot blogs.

Belum ada Komentar untuk "Add Breaking News bar to your blogger sites"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel