$(document).ready(function(){ $("#subTab div").hide(); $("#intTab li:first").attr("id","current"); $("#subTab div:first").fadeIn(); $('#intTab a').click(function(e){ e.preventDefault(); $("#subTab div").hide(); $("intTab li").attr("id",""); $(this).parent().attr("id","current"); $('#'+$(this).attr('title')).fadeIn(); }); }); /* Çì´õ °íÁ¤ */ $(document).ready(function(){ var currentPosition = parseInt($(".quickmenu").css("top")); $(window).scroll(function() { var position = $(window).scrollTop(); $(".quickmenu").stop().animate({"top":position+currentPosition+"px"},1000); }); }); /* ÅǸ޴º 240305 */ (function (global, $) { var $menu = $('.floating-menu li.m'), $contents = $('.scroll'), $doc = $('html, body'); $(function () { // ÇØ´ç ¼½¼ÇÀ¸·Î ½ºÅ©·Ñ À̵¿ $menu.on('click','a', function(e){ var $target = $(this).parent(), idx = $target.index(), section = $contents.eq(idx), offsetTop = section.offset().top; $doc.stop() .animate({ scrollTop :offsetTop }, 800); return false; }); }); // menu class Ãß°¡ $(window).scroll(function(){ var scltop = $(window).scrollTop(); $.each($contents, function(idx, item){ var $target = $contents.eq(idx), i = $target.index(), targetTop = $target.offset().top; if (targetTop <= scltop) { $menu.removeClass('on'); $menu.eq(idx).addClass('on'); } if (!(500 <= scltop)) { $menu.removeClass('on'); } }) }); // Go to the TOP var btnTop = $('.btn-top'); btnTop.on('click','a', function(e){ e.preventDefault(); $doc.stop() .animate({ scrollTop : 0 },500) }); }(window, window.jQuery));