// JavaScript Document /* -------------------------------------------------------------------------------------- 各種ユニット --------------------------------------------------------------------------------------- */ $(function init(){ slide(); scrollbar(); }); /* -------------------------------------------------------------------------------------- スライドイベント --------------------------------------------------------------------------------------- */ var slide = function (){ //設定 var init = { count : 0, animation : "normal", Interval : 6000, image : { length : $("#imgbox p").length, width : $("#imgbox p").width() }, box : parseInt(($("#imgbox p").length) * $("#imgbox p").width()), Tag : '
  • ', path : { Default : 'images/slide_btn.gif', over : 'images/slide_btn_on.gif' }, list : $("#imgbox #box-inner div") }; //親ボックスのサイズを入れる init["list"].css({ "width" : init["box"], "overflow" : "hidden" }); /* -------------------------------------------------------------------------------------- イメージボタン --------------------------------------------------------------------------------------- */ //リストボタンの作成 for(var i=0; i= 0 && moveCalc <= (box[divergenceNumber].offsetHeight - thumb[divergenceNumber].offsetHeight)) { thumb[divergenceNumber].style.top = moveCalc + 'px'; table[divergenceNumber].style.top = '-' + ((e.pageY - calcPageY) + thumbOffsetTop) * Adjust + 'px'; } } } var scrollEventEnd = function (e) { e.preventDefault(); clickFlug = false; } thumb[0].addEventListener('mousedown', divergence, false); thumb[1].addEventListener('mousedown', divergence, false); thumb[0].addEventListener('mousedown', scrollEvent, false); thumb[1].addEventListener('mousedown', scrollEvent, false); document.addEventListener('mousemove', scrollEventMove, { passive: false }); document.addEventListener('mouseup', scrollEventEnd, false); }