Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

Tuesday 5 June 2012

Featured Content Slider For Blogger


Featured Content Slider is one of the best way to featured some of the best content from your blog to your users.....to add this just follow the following steps.....
  • Go to your blogger > Template > Edit Html
  • Just above the </head> paste this script

<script src="http://widcraft.googlecode.com/svn/jquery.js" type="text/javascript">
</script>
<script type="text/javascript">
$(document).ready(function() {

 //Execute the slideShow
 slideShow();
});
function slideShow() {
 //Set the opacity of all images to 0
 $('#gallery a').css({opacity: 0.0});

 //Get the first image and display it (set it to full opacity)
 $('#gallery a:first').css({opacity: 1.0});

 //Set the caption background to semi-transparent
 $('#gallery .caption').css({opacity: 0.7});
 //Resize the width of the caption according to the image width
 $('#gallery .caption').css({width: $('#gallery a').find('img').css('width')});

 //Get the caption of the first image from REL attribute and display it
 $('#gallery .content').html($('#gallery a:first').find('img').attr('rel'))
 .animate({opacity: 0.7}, 400);

 //Call the gallery function to run the slideshow, 6000 = change to next image after 6 seconds
 setInterval('gallery()',6000);

}
function gallery() {

 //if no IMGs have the show class, grab the first image
 var current = ($('#gallery a.show')?  $('#gallery a.show') : $('#gallery a:first'));
 //Get next image, if it reached the end of the slideshow, rotate it back to the first image
 var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#gallery a:first') :current.next()) : $('#gallery a:first'));

 //Get next image caption
 var caption = next.find('img').attr('rel');

 //Set the fade in effect for the next image, show class has higher z-index
 next.css({opacity: 0.0})
 .addClass('show')
 .animate({opacity: 1.0}, 1000);
 //Hide the current image
 current.animate({opacity: 0.0}, 1000)
 .removeClass('show');

 //Set the opacity to 0 and height to 1px
 $('#gallery .caption').animate({opacity: 0.0}, { queue:false, duration:50 }).animate({height: '1px'}, { queue:true, duration:300 });

 //Animate the caption, opacity to 0.7 and heigth to 100px, a slide up effect
 $('#gallery .caption').animate({opacity: 0.7},100 ).animate({height: '100px'},500 );

 //Display the content
 $('#gallery .content').html(caption);
}
</script>
  • Now Save and after saving close that edit html window and click on  Customise/Customize 
  • Click On Advance > Add CSS and paste the script from below

.clear{clear:both}
#gallery{position:relative;width:500px;height:400px}
#gallery a{float:left;position:absolute;}
#gallery a img{border:none;}
#gallery a.show{z-index:500}
#gallery .caption{z-index:600;background-color:#000;color:#ffffff;height:100px;width:100%;position:absolute;bottom:0;}
#gallery .caption .content{margin:5px}
#gallery .caption .content h3{margin:0;padding:0;color:#1DCCEF;}

  • Click on Apply To Blog 
  • Now paste the script from below to where you want to add this widget example in template/posts/pages/gadget

<div id="gallery">
<a href="#" class="show">
<img src="IMAGE_URL" alt="Flowing Rock" width="580" height="360" title="" alt="" rel="<h3>TITLE 1</h3>Description 1 "/>
</a>
<a href="#">
<img src="IMAGE_URL" alt="Grass Blades" width="580" height="360" title="" alt="" rel="<h3>TITLE 2</h3>Description 2 "/>
</a>
<a href="#">
<img src="IMAGE_URL" alt="Ladybug" width="580" height="360" title="" alt="" rel="<h3>TITLE 3 3</h3>Description 3"/>
</a>
<a href="#">
<img src="IMAGE_URL" alt="Lightning" width="580" height="360" title="" alt="" rel="<h3>TITLE 4</h3>Description 4"/>
</a>
<div class="caption">
<div class="content">
</div>
</div>
<div style="clear: both;">
</div>
</div>
  • Change IMAGE_URL with the url of your image and # with your post/page url and TITLE and Description with your content title and description and you're done :D

Sunday 22 April 2012

Awesome CSS And jQuery Fixed Fade Out Menu For Blogger



The aim is to have a fixed navigation that follows the user when he scrolls, and only subtly showing itself by fading out and becoming almost transparent. When the user hovers over it, the menu then becomes opaque again.
Inside of the navigation we will have some links, a search input and a top and bottom button that let the user navigate to the top or the bottom of the page.
  • Go To Blogger Dashboard > Design > Edit HTML
  • Search for the tag </head>
  • And paste the code above it.....

<link rel="stylesheet" href="https://sites.google.com/site/widgetcraftfiles/home/hb-fadeout.css"/>
<script type="text/javascript" src="http://widcraft.googlecode.com/svn/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(window).scroll(function(){
var scrollTop = $(window).scrollTop();
if(scrollTop != 0)
$('#nav').stop().animate({'opacity':'0.2'},400);
else  
$('#nav').stop().animate({'opacity':'1'},400);
});
$('#nav').hover(
function (e) {
var scrollTop = $(window).scrollTop();
if(scrollTop != 0){
$('#nav').stop().animate({'opacity':'1'},400);
}
},
function (e) {
var scrollTop = $(window).scrollTop();
if(scrollTop != 0){
$('#nav').stop().animate({'opacity':'0.2'},400);
}
}
);
});
</script>

  • Now search for the <body>
  • Just below it paste the following code.
<div id="nav">
<ul>
<li><a class="top" href="#top"><span></span></a></li>
<li><a class="bottom" href="#bottom"><span></span></a></li>
<li><a href='Your Link Here'>Text Here</a></li>
<li><a href='Your Link Here'>Text Here</a></li>
<li><a href='Your Link Here'>Text Here</a></li>
<li><a href='Your Link Here'>Text Here</a></li>
<li><a href='Your Link Here'>Text Here</a></li>
<li><a href='Your Link Here'>Text Here</a></li>
<li class="search">
<input type="text"/><input class="searchbutton" type="submit" value=""/>
</li>
</ul>
</div>      
<div id="top"></div>
<div class="desc"></div>
<div id="bottom"></div>
<div class="scroll"></div>

  • Now replace Your Link Here with the link which you want to add to a text.
  • And replace Text Here with the text which you want to appear on fade out menu.

Shareaholic Sexy Bookmarks Widget For Blogger


  • Go to Blogger Dashboard > Design > Edit HTML. (In new user interface Dashboard > Template)
  • First download a copy of your template
  • Now find ]]></b:skin> in your template
  • Add the code given below  just above  ]]></b:skin>  -
div.shr-bookmarks{margin:20px 0 8px;clear:both !important;display:block !important}div.shr-bookmarks ul.shr-socials{width:100% !important;margin:0 !important;padding:0 !important;float:left !important}div.shr-bookmarks ul.shr-socials{background:transparent none !important;border:0 none !important;outline:0 none !important}div.shr-bookmarks ul.shr-socials li{display:inline !important;float:left !important;list-style-type:none !important;padding:0 !important;height:29px !important;width:60px !important;cursor:pointer !important;margin:3px 0 0 !important;background-color:transparent !important;border:0 none !important;outline:0 none !important;clear:none !important}div.shr-bookmarks ul.shr-socials li:before,div.shr-bookmarks ul.shr-socials li:after,div.shr-bookmarks ul.shr-socials li a:before,div.shr-bookmarks ul.shr-socials li a:after{content:'' !important;}div.shr-bookmarks ul.shr-socials a,div.shr-bookmarks ul.shr-socials a:hover{display:block !important;width:60px !important;height:29px !important;text-indent:-9999px !important;background-color:transparent !important;text-decoration:none !important;border:0 none !important}div.shr-bookmarks ul.shr-socials a:hover,div.shr-bookmarks ul.shr-socials li:hover{background-color:transparent !important;border:0 none !important;outline:0 none !important}.shareaholic-show-on-load{display: block !important;}div.shr-bookmarks div.shr-getshr{line-height:20px !important;padding-left:8px !important;float:left !important;}div.shr-bookmarks div.shr-getshr a{width:auto !important;font-size:10px !important; text-indent:0px !important;text-decoration:none !important;}div.shr-count{font:12px bold,arial !important;position: relative !important;}div.shr-count-outline{position: absolute !important;color: white !important;}div.shr-count-center{position: absolute !important;color: blue !important;}li.shr-2{background-position:-120px bottom !important}li.shr-2:hover{background-position:-120px top !important}li.shr-3{background-position:-180px bottom !important}li.shr-3:hover{background-position:-180px top !important}li.shr-5{background-position:-300px bottom !important}li.shr-5:hover{background-position:-300px top !important}li.shr-7{background-position:-420px bottom !important}li.shr-7:hover{background-position:-420px top !important}li.shr-10{background-position:-600px bottom !important}li.shr-10:hover{background-position:-600px top !important}li.shr-38{background-position:-2280px bottom !important}li.shr-38:hover{background-position:-2280px top !important}li.shr-40{background-position:-2400px bottom !important}li.shr-40:hover{background-position:-2400px top !important}li.shr-43{background-position:-2580px bottom !important}li.shr-43:hover{background-position:-2580px top !important}li.shr-52{background-position:-3120px bottom !important}li.shr-52:hover{background-position:-3120px top !important}li.shr-74{background-position:-4440px bottom !important}li.shr-74:hover{background-position:-4440px top !important}li.shr-88{background-position:-5280px bottom !important}li.shr-88:hover{background-position:-5280px top !important}li.shr-106{background-position:-6360px bottom !important}li.shr-106:hover{background-position:-6360px top !important}li.shr-201{background-position:-12060px bottom !important}li.shr-201:hover{background-position:-12060px top !important}li.shr-219{background-position:-13140px bottom !important}li.shr-219:hover{background-position:-13140px top !important}
  • Now check  Expand Widget Templates and  find :
<div class='post-footer'>
  • And paste code given below just below <div class='post-footer'> :

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div class='shr_class shareaholic-show-on-load'>
</div>
<script type='text/javascript'>
var SHRSB_Settings = {&quot;shr_class&quot;:{&quot;src&quot;:&quot;http://www.shareaholic.com/media/css/styles/sb&quot;,&quot;link&quot;:&quot;&quot;,&quot;service&quot;:&quot;5,7,2,38,3,219,43,52,201,88,74,10,106,45,40,210,78,39&quot;,&quot;apikey&quot;:&quot;6ffe2cbf142c45bd4cd03b01ec46b8658&quot;,&quot;localize&quot;:true,&quot;shortener&quot;:&quot;google&quot;,&quot;shortener_key&quot;:&quot;&quot;,&quot;designer_toolTips&quot;:true,&quot;twitter_template&quot;:&quot;Some fancy post title - http://goo.gl/dbqlx via @hardeepasrani&quot;}};
</script>
<script type='text/javascript'>
(function() {
var sb = document.createElement(&quot;script&quot;); sb.type = &quot;text/javascript&quot;;sb.async = true;
sb.src = (&quot;https:&quot; == document.location.protocol ? &quot;https://dtym7iokkjlif.cloudfront.net&quot; : &quot;http://cdn.shareaholic.com&quot;) + &quot;/media/js/jquery.shareaholic-publishers-sb.min.js&quot;;
var s = document.getElementsByTagName(&quot;script&quot;)[0]; s.parentNode.insertBefore(sb, s);
})();
</script><a href='http://www.widcraft.blogspot.com/' target='_blank'>Social Bookmarking Gadget</a></b:if>
  • Replace hardeepasrani with your twitter username.
  • Now save your template and you are done..

Monday 16 April 2012

Static Facebook Pop Out Like Box Widget For Blogger - Version 1.0


Facebook pages connect us with our visitors and fans and it's important for us to get more likes on our facebook page and deliver good content to our visitors. This widget will help you a lot on it , first i introduce tutorial of adding it but now you can add this in your blog with our widget generator :

Popular Posts

 
Powered by Blogger.