Click Below Ad for Leaning Blogging Tricks.
Hello Friend Today I am Posting Unique & Amazing Popular Post widget for Bloggers its called Beautiful and Elegant widget.
So the Widget i am going today look quite and different form the rest of collections.
You can See the Proof of Beautiful Elegant Popular Post In Blogspot.
Click the Live Demo Button To see this Widget.
How To Add Elegant Popular Post Widget in Blogger:-
- Go To Blogger Dashbord
- Click On Layout
- Add Widget of Popular Posts
- Add This Widget in Desired Place
- Save The Widget
Remember to check the snippet and Image Thumbnail option.
Adding the CSS (Cascading Style Sheet):-
Now you have add the CSS of the Popular Posts Widget:-
- Go to Blogger Dashboard
- Click On Template
- Clock on edit HTML
- Press Keys (Ctrl+F) And Find this Code
- ]]></b:skin>
- After You Seen this code
- just Paste Given Code in Blue Font before the ]]></b:skin>
<script src='//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'/>
<script type='text/javascript'> $(document).ready(function() {$('.PopularPosts img').attr('src', function(i, src) {return src.replace( 's72-c', 's400' );});});</script> <script type='text/javascript'> //<![CDATA[ // Popular Posts customization by softwayrko.blogspot.com // Trim Code by MS-potilas 2012 $('.popular-posts ul li .item-snippet').each(function(){ var txt=$(this).text().substr(0,120); var j=txt.lastIndexOf(' '); if(j>10) $(this).text(txt.substr(0,j).replace(/[?,!\.-:;]*$/,'...')); }); //]]> </script>
Note:-Also removed the previous Popular Posts CSS Codes if any befor adding this code.
Adding JavaScript:-
Default Popular Posts widget do not require any JavaScript,but This Widget Require for resize the Popular Posts image and cut short the snippet.
How To Add JavaScript:-
- Find </body> tag in your template.
- Copy the Following code before the </body>
<script src='//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'/>
<script type='text/javascript'>
$(document).ready(function() {$('.PopularPosts img').attr('src', function(i, src) {return src.replace( 's72-c', 's400' );});});
</script>
<script type='text/javascript'>
//<![CDATA[
// Popular Posts customization by softwayrko.blogspot.com
// Trim Code by MS-potilas 2012
$('.popular-posts ul li .item-snippet').each(function(){
var txt=$(this).text().substr(0,120);
var j=txt.lastIndexOf(' ');
if(j>10)
$(this).text(txt.substr(0,j).replace(/[?,!\.-:;]*$/,'...'));
});
//]]>
</script>
0 blogger-facebook: