/* ## wrFadeSlide Plug-in ## @name : WebsRe Fade Slide Plug-In @version : 1.0 @date : 2017-04-13 @author : Park Soo Hyun (shpark7502@naver.com) * º» ½ºÅ©¸³Æ®´Â À¥½º¸®ÆÛºí¸¯ÀÇ ÀúÀÛ¹°·Î ¹«´ÜÀ¸·Î µµ¿ë ¶Ç´Â º¹»ç, ¼öÁ¤ »ç¿ë½Ã ¹ýÀû ó¹úÀ» ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. */ (function($) { $.fn.wrFadeSlide = function(options) { return this.each(function() { var opts = $.extend({paging: true, autoplay: true, interval: 3000}, options); var _this = $(this); var $elem = _this.find('.imgList').children(); var $first = 1, $last = _this.find('.imgList').children().eq(-1).data('index'), $count = _this.find('.imgList').children().length; var $fadeTimer; var $fadeDelay = opts.interval; // À̹ÌÁö ¸®½ºÆ® ÆäÀ̵å ÇÔ¼ö function fadeImage(index) { var $active = _this.find('.imgList > li.active'); var $currIndex = $active.data('index'); var $control = _this.find('.control').children(); var $next; if(!index) { // index ÀÎÀÚ°¡ Á¤ÀǵÇÁö ¾Ê¾ÒÀ» °æ¿ì $next = _this.find('.imgList > li[data-index=' + ($currIndex + 1) + ']').length ? _this.find('.imgList > li[data-index=' + ($currIndex + 1) + ']') : _this.find('.imgList > li[data-index=' + $first + ']'); } else { // index ÀÎÀÚ°¡ Á¤ÀǵǾî ÀÖÀ» °æ¿ì $next = _this.find('.imgList > li[data-index=' + index + ']'); } if(!$elem.is(':animated')) { if($active.data('index') != $next.data('index')) { var $paging = _this.find('.pagination').children(); $active.addClass('active-last'); $paging.removeClass('on'); $paging.eq($next.data('index') - 1).addClass('on'); $control.removeClass('on'); $control.eq($next.data('index') - 1).addClass('on'); $next.css('opacity','0').addClass('active').animate({opacity:'1'}, 400, function() { $active.removeClass('active-last active'); }); } } } // ÆäÀÌÁö³×ÀÌ¼Ç »ý¼º function pagingInit() { if(opts.paging == true) { var item = "
"; _this.append('