|
|
|
16-06-03
|
조회 3,035
|
|
|
|
15-07-30
|
조회 3,423
|
|
|
|
15-06-08
|
조회 5,564
|
|
|
|
15-05-27
|
조회 4,421
|
|
|
|
15-01-08
|
조회 6,722
|
|
|
|
14-12-30
|
조회 5,454
|
|
|
|
14-10-10
|
조회 5,444
|
|
|
|
14-08-13
|
조회 6,360
|
|
|
|
14-08-11
|
조회 5,217
|
|
|
|
14-08-06
|
조회 6,549
|
|
|
|
14-03-19
|
조회 7,443
|
|
|
|
13-04-26
|
조회 9,598
|
|
|
|
12-12-15
|
조회 5,123
|
|
|
|
12-12-15
|
조회 7,358
|
|
|
|
12-12-11
|
조회 5,504
|
|
|
|
12-11-21
|
조회 6,032
|
|
|
|
12-10-11
|
조회 5,107
|
|
|
|
12-10-03
|
조회 4,801
|
|
|
|
12-09-20
|
조회 6,099
|
|
|
|
12-09-02
|
조회 4,276
|
|
|
byfun
|
12-08-29
|
조회 5,291
|
|
|
|
12-08-29
|
조회 4,169
|
|
|
|
12-08-24
|
조회 4,272
|
|
|
|
12-08-18
|
조회 4,488
|
|
|
|
12-08-17
|
조회 4,531
|
|
|
|
12-08-16
|
조회 3,789
|
|
|
|
12-08-06
|
조회 5,563
|
|
|
|
12-08-05
|
조회 4,850
|
|
|
|
12-08-03
|
조회 4,567
|
|
|
|
12-08-03
|
조회 4,718
|
|
|
|
12-07-29
|
조회 3,565
|
|
|
|
12-07-24
|
조회 4,156
|
|
|
|
12-07-22
|
조회 3,622
|
|
|
|
12-07-20
|
조회 4,386
|
|
|
|
12-07-19
|
조회 4,728
|
|
|
|
12-07-19
|
조회 3,954
|
|
|
|
12-07-19
|
조회 3,900
|
|
|
|
12-07-19
|
조회 5,568
|
|
|
|
12-07-19
|
조회 3,511
|
|
|
|
12-07-18
|
조회 5,202
|
|
|
|
12-07-15
|
조회 4,179
|
|
|
|
12-07-14
|
조회 3,848
|
|
|
|
12-07-12
|
조회 4,521
|
|
|
|
12-07-11
|
조회 3,795
|
|
|
|
12-07-11
|
조회 3,515
|
|
|
|
12-07-11
|
조회 3,492
|
|
|
|
12-07-10
|
조회 4,679
|
|
|
|
12-07-09
|
조회 3,429
|
|
|
|
12-07-09
|
조회 4,245
|
|
|
|
12-07-09
|
조회 4,663
|
|
|
|
12-07-08
|
조회 4,580
|
|
|
|
12-07-07
|
조회 5,503
|
|
|
|
12-07-06
|
조회 4,756
|
|
|
|
12-07-06
|
조회 4,024
|
|
|
|
12-07-06
|
조회 3,908
|
|
|
|
12-07-06
|
조회 3,851
|
|
|
|
12-07-02
|
조회 5,524
|
|
|
|
12-07-02
|
조회 4,221
|
|
|
|
12-06-29
|
조회 3,751
|
|
|
|
12-06-28
|
조회 4,369
|
|
|
|
12-06-26
|
조회 3,864
|
|
|
|
12-06-26
|
조회 4,986
|
|
|
|
12-06-21
|
조회 3,961
|
|
|
|
12-06-20
|
조회 4,662
|
|
|
|
12-06-20
|
조회 4,300
|
|
|
|
12-06-15
|
조회 4,654
|
|
|
|
12-06-15
|
조회 4,389
|
|
|
|
12-06-13
|
조회 7,405
|
|
|
|
12-06-05
|
조회 7,381
|
|
|
|
12-06-04
|
조회 3,956
|
|
|
|
12-06-03
|
조회 3,806
|
|
|
|
12-05-31
|
조회 3,800
|
|
|
|
12-05-28
|
조회 6,648
|
|
|
|
12-05-27
|
조회 3,879
|
|
|
|
12-05-25
|
조회 4,015
|
|
|
|
12-05-23
|
조회 4,423
|
|
|
|
12-05-21
|
조회 5,136
|
|
|
|
12-05-17
|
조회 4,066
|
|
|
|
12-05-17
|
조회 3,985
|
|
|
|
12-05-09
|
조회 4,062
|
|
|
|
12-05-07
|
조회 4,319
|
|
|
|
12-05-02
|
조회 4,504
|
|
|
|
12-05-01
|
조회 4,682
|
|
|
|
12-04-30
|
조회 3,430
|
|
|
|
12-04-30
|
조회 4,374
|
|
|
|
12-04-25
|
조회 4,464
|
|
|
|
12-04-25
|
조회 4,887
|
|
|
|
12-04-24
|
조회 3,856
|
|
|
|
12-04-24
|
조회 4,626
|
|
|
|
12-04-23
|
조회 3,616
|
|
|
|
12-04-20
|
조회 3,274
|
|
|
|
12-04-17
|
조회 5,457
|
|
|
|
12-04-16
|
조회 4,395
|
|
|
|
12-04-14
|
조회 3,673
|
|
|
|
12-04-14
|
조회 3,710
|
|
|
|
12-04-14
|
조회 3,758
|
|
|
|
12-04-13
|
조회 3,378
|
|
|
|
12-04-13
|
조회 4,566
|
|
|
|
12-04-13
|
조회 6,207
|
|
|
|
12-04-12
|
조회 3,370
|
댓글 2개
코드는 대충 저 사이트에서 js 파일만 뽑아보니 다음과 같습니다.
(function($) {
var NivoSlider = function(element, options){
//Defaults are below
var settings = $.extend({}, $.fn.nivoSlider.defaults, options);
//Useful variables. Play carefully.
var vars = {
currentSlide: 0,
currentImage: '',
totalSlides: 0,
running: false,
paused: false,
stop: false
};
//Get this slider
var slider = $(element);
slider.data('nivo:vars', vars);
slider.css('position','relative');
slider.addClass('nivoSlider');
//Find our slider children
var kids = slider.children();
kids.each(function() {
var child = $(this);
var link = '';
if(!child.is('img')){
if(child.is('a')){
child.addClass('nivo-imageLink');
link = child;
}
child = child.find('img:first');
}
//Get img width & height
var childWidth = child.width();
if(childWidth == 0) childWidth = child.attr('width');
var childHeight = child.height();
if(childHeight == 0) childHeight = child.attr('height');
//Resize the slider
if(childWidth > slider.width()){
slider.width(childWidth);
}
if(childHeight > slider.height()){
slider.height(childHeight);
}
if(link != ''){
link.css('display','none');
}
child.css('display','none');
vars.totalSlides++;
});
//If randomStart
if(settings.randomStart){
settings.startSlide = Math.floor(Math.random() * vars.totalSlides);
}
//Set startSlide
if(settings.startSlide > 0){
if(settings.startSlide >= vars.totalSlides) settings.startSlide = vars.totalSlides - 1;
vars.currentSlide = settings.startSlide;
}
//Get initial image
if($(kids[vars.currentSlide]).is('img')){
vars.currentImage = $(kids[vars.currentSlide]);
} else {
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
}
//Show initial link
if($(kids[vars.currentSlide]).is('a')){
$(kids[vars.currentSlide]).css('display','block');
}
//Set first background
slider.css('background','url("'+ vars.currentImage.attr('src') +'") no-repeat');
//Create caption
slider.append(
$('<div class="nivo-caption"><p></p></div>').css({ display:'none', opacity:settings.captionOpacity })
);
// Cross browser default caption opacity
$('.nivo-caption', slider).css('opacity', 0);
// Process caption function
var processCaption = function(settings){
var nivoCaption = $('.nivo-caption', slider);
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
var title = vars.currentImage.attr('title');
if(title.substr(0,1) == '#') title = $(title).html();
if(nivoCaption.css('opacity') != 0){
nivoCaption.find('p').stop().fadeTo(settings.animSpeed, 0, function(){
$(this).html(title);
$(this).stop().fadeTo(settings.animSpeed, 1);
});
} else {
nivoCaption.find('p').html(title);
}
nivoCaption.stop().fadeTo(settings.animSpeed, settings.captionOpacity);
} else {
nivoCaption.stop().fadeTo(settings.animSpeed, 0);
}
}
//Process initial caption
processCaption(settings);
//In the words of Super Mario "let's a go!"
var timer = 0;
if(!settings.manualAdvance && kids.length > 1){
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
}
//Add Direction nav
if(settings.directionNav){
slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav" title="Prev"></a><a class="nivo-nextNav" title="Next"></a></div>');
//Hide Direction nav
if(settings.directionNavHide){
$('.nivo-directionNav', slider).hide();
slider.hover(function(){
$('.nivo-directionNav', slider).show();
}, function(){
$('.nivo-directionNav', slider).hide();
});
}
$('a.nivo-prevNav', slider).live('click', function(){
if(vars.running) return false;
clearInterval(timer);
css media 부분이 가로폭에 따라 대응하는 스타일이죠~
저도 자주 쓰긴 합니다만, ie7, 8같이 표현 못하는 경우는 걍 min-width로 고정시켜버리면 문제는 끝...이라...-0-;