Tutorial ensinando a colocar em seu blog slider numerado em jquery, antes de mais nada esse slide e tutorial foi feito originalmente pela Xtreme Evollution creditos para eles, espero que o pessoal da xtreme não se importe. Então vamos começar.
- No painel do blog clique em design > Editar HTML
- Aperte CTRL + F e procure por:
]]></b:skin>
- Depois copie o código abaixo e cole acima do ]]></b:skin>
/* Slide by Driigo----------------------------------------------- */.main_view {float: left;ative;position: re
}lsolid #0.window {height:300px;width: 980px;overflowborder:1p
x00
;: hidden;elative;position:
rn: absolute;
top: 0margin: 0 0 20px 0;}
.image_reel {0;positi
}
.
o; left:
image_reel img {ging {float: left;
}
.papx;
height:40px;
z-position: absolute;bottom: 30px;idth: 40right: -1px;
0in
wdex: 100;center;text-align
line-heigh
:t: 40px;background: url(http://dl.dropbox.com/u/32586820/%B00000%5DTemplate%20FDMDowns/transparencia.png);
-moz-border-radius-topleft: 25px;
-moz-border-radiu
5s-bottomleft: 25px;
-webkit-border-radius-bottomleft: 25px;
-webkit-border-radius-topleft: 25px;
border:1px solid #000;
display: none;
}
.paging a {outline:none;radius: 17px;
padding: 5px 10px;
text-decoration: none;
color: #999;
background: #000;border: 1px solid #000;
-moz-border-radius: 17px;
-khtml-border
-
-webkit-border-radius: 17px;
}
.paging a.active {
font-weight: bold;
border: 1px solid #000;
color: #fff;
background: #188696;/*COR DE FUNDO DOS NUMEROS ATIVOS*/
-moz-border-radius: 17px;
-khtml-border-radius: 17px;
-webkit-border-radius: 17px;
}
.paging a:hover {
font-weight: bold;
}
/* Fim Slider */
- Depois copie o código abaixo e cole acima
<!-- JS cod --><script src='http://dl.dropbox.com/u/32586820/www.xtremeevollution.com/jquery.min.js' type='text/javascript'/><script type='text/javascript'>$(document).ready(function() {//Set Default State of each portfolio pieceing").show();
$(".paging a:first&
$(".pa
gquot;).addClass("active");
//Get size of images, how many there arethen determin the size of the image reel.
var imageWidth = $(".window").
,width();
var imageSum = $(".image_reel img").size();
var imageReelWidth = imageWidth * imageSum;
//Adjust the image reel to its new size//Paging + Slider Function
rotate =
$(".image_reel").css({'width' : imageReelWidth});
function(){var triggerID = $active.attr("rel") - 1; //Get number of times to slidemageWidth; //Determines the distance the image reel needs to slide
$(".pagi
var image_reelPosition = triggerID *
ing a").removeClass('active'); //Remove all active class
$active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)
//Slider Animation$(".image_reel").animate({(){ //Set timer - this will repeat itself ev
left: -image_reelPosition
}, 500 );
};
//Rotation + Timing Event
rotateSwitch = function(){
play = setInterval(functio
nery 3 seconds
$active = $('.paging a.active').next();
if ( $active.length === 0) { //If paging reaches the end...
$active = $('.paging a:first'); //go back to first
}rotate(); //Trigger the paging and slider function(function() {
clearInterval(play); //Stop the rotation
}, 7000); //Timer speed in milliseconds (3 seconds)
};
rotateSwitch(); //Run function on launch
//On Hover
$(".image_reel a").hove
r
}, function() {
rotateSwitch(); //Resume rotation
});
//On Click
$(".paging a").click(function() {
$active = $(this); //Activate the clicked paging
//Reset Timer
clearInterval(play); //Stop the rotation
rotate(); //Trigger rotation immediately
rotateSwitch(); // Resume rotation
return false; //Prevent browser jump to link anchor
});
});
</script>
09:24
Gustavo Mario



0 comentários:
Postar um comentário