Commit 035c3ae3 by o.kimura

初回コミット

parents
Showing with 1211 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

No preview for this file type
File mode changed
$(function() {
//コンテンツの横サイズ
var cont = $('#contents');
var contW = $('.section').outerWidth(true) * $('div',cont ).length + 1000;
cont.css('width', contW);
//スクロールスピード
var speed = 50;
//マウスホイールで横移動
$('html').mousewheel(function(event, mov) {
if ( mov > 0) {
//マウスホイールを上方向に回すときのスピード
var speed = 1000;
} else if ( mov < 0 ) {
//マウスホイールを下方向に回すときのスピード
var speed = 100;
}
//ie firefox
$(this).scrollLeft($(this).scrollLeft() - mov * speed);
//webkit
$('body').scrollLeft($('body').scrollLeft() - mov * speed);
return false; //縦スクロール不可
});
$('#nav a').click(function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollLeft: $($anchor.attr('href')).offset().left
}, 500);
event.preventDefault();
});
});
\ No newline at end of file
body { background-color:#d6d6d6;}
/* #header #footer */
#header,
#footer { width: 100%; background: #000}
#header .header_inner,
#footer .footer_inner { margin: 0 auto; width: 864px;}
/**/
#header h1 { float: left; margin-top:10px; width: 325px; height: 40px; background:url(../img/header_SORA.png) no-repeat 0 0;}
#header h1 a { display: block; width: 80px; height: 40px; text-indent: -10000px;}
#header p {float: right; margin-top:5px; width: 131px;}
#footer p { padding: 4px; font-size: 10px; color: #fff; text-align: right;}
/* #contents */
#contents { margin: 0 auto; width: 946px; padding: 0; background: url(../img/bg_contents.gif) repeat-y center top;}
h1#mainVisual { margin: 0 auto; width: 760px; height:600px; background: url(../img/mainVisual.png) no-repeat center 0; text-indent: -10000px;}
.contents_inner { margin: 0 auto; padding: 60px 60px 10px 60px; width: 640px; background: url(../img/bg_contents_inner.jpg) repeat-y 0 0;}
.section { margin-bottom: 50px;}
.section h2{ display: none;}
.section p { margin-bottom: 1em; font-size: 17px; color: #000;}
.section strong { font-weight: bold; font-size: 19px;}
.section img { margin-bottom: 0.5em; border: 3px solid #000;}
#contents_footer { margin: 0 auto; width: 760px; padding-top: 12px; background: url(../img/line.gif) repeat-x 0 0;}
#contents_footer .section { padding-top: 20px;}
#bookmarklet { margin: 50px auto; width: 400px;}
#bookmarklet li { float: left; width: 100px;}
#likeBox { margin-top: 100px;}
#likeBox #likeBox_inner { background-color: #fff;}
.lazy { background: url(../img/photo/loader.gif) no-repeat center center;}
/* noscript --------------------------------- */
/* clearfix --------------------------------- */
#header .header_inner:after,
#bookmarklet:after,
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html #header .header_inner,
* html #bookmarklet,
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html #header .header_inner,
*:first-child+html #bookmarklet,
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
html {
background: #000;
}
#contents {
overflow: hidden;
padding: 60px;
}
div.section {
width: 500px;
background: #fff;
padding: 20px;
height: 400px;
float: left;
margin-right: 2px;
}
#nav {
list-style: none;
margin-bottom: 10px;
position: fixed;
left: 60px;
top: 30px;
}
#nav li {
display: inline;
margin-right: 0.5em;
}
#nav li a {
color: #fff;
}
#s01{ width: 1000px; }
#s03{ width: 800px; }
#s05{ width: 1500px; }
\ No newline at end of file
/*
* Lazy Load - jQuery plugin for lazy loading images
*
* Copyright (c) 2007-2012 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.appelsiini.net/projects/lazyload
*
* Version: 1.8.3
*
*/
(function(a,b,c,d){var e=a(b);a.fn.lazyload=function(c){function i(){var b=0;f.each(function(){var c=a(this);if(h.skip_invisible&&!c.is(":visible"))return;if(!a.abovethetop(this,h)&&!a.leftofbegin(this,h))if(!a.belowthefold(this,h)&&!a.rightoffold(this,h))c.trigger("appear"),b=0;else if(++b>h.failure_limit)return!1})}var f=this,g,h={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null};return c&&(d!==c.failurelimit&&(c.failure_limit=c.failurelimit,delete c.failurelimit),d!==c.effectspeed&&(c.effect_speed=c.effectspeed,delete c.effectspeed),a.extend(h,c)),g=h.container===d||h.container===b?e:a(h.container),0===h.event.indexOf("scroll")&&g.bind(h.event,function(a){return i()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,c.one("appear",function(){if(!this.loaded){if(h.appear){var d=f.length;h.appear.call(b,d,h)}a("<img />").bind("load",function(){c.hide().attr("src",c.data(h.data_attribute))[h.effect](h.effect_speed),b.loaded=!0;var d=a.grep(f,function(a){return!a.loaded});f=a(d);if(h.load){var e=f.length;h.load.call(b,e,h)}}).attr("src",c.data(h.data_attribute))}}),0!==h.event.indexOf("scroll")&&c.bind(h.event,function(a){b.loaded||c.trigger("appear")})}),e.bind("resize",function(a){i()}),/iphone|ipod|ipad.*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent.persisted&&f.each(function(){a(this).trigger("appear")})}),a(b).load(function(){i()}),this},a.belowthefold=function(c,f){var g;return f.container===d||f.container===b?g=e.height()+e.scrollTop():g=a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return f.container===d||f.container===b?g=e.width()+e.scrollLeft():g=a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return f.container===d||f.container===b?g=e.scrollTop():g=a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return f.container===d||f.container===b?g=e.scrollLeft():g=a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!a.rightoffold(b,c)&&!a.leftofbegin(b,c)&&!a.belowthefold(b,c)&&!a.abovethetop(b,c)},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})})(jQuery,window,document)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>2012-06-15 1st - js do it</title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<link rel="stylesheet" type="text/css" media="screen,print" href="style.css" />
</head>
<body>
<!-- generated by: jsdo.it - http://jsdo.it/webcreatureslab/zGOQ -->
<!-- Copyright webcreatureslab - http://jsdo.it/webcreatureslab -->
<!-- Licensed under MIT License - http://www.opensource.org/licenses/mit-license.php -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>横スクロールサイトのテスト</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<!-- mousewheel.js -->
<script type="text/javascript" src="https://www.sugarsync.com/pf/D8744958_771_656537937"></script>
<!-- easing.js -->
<script type="text/javascript" src="https://www.sugarsync.com/pf/D8744958_771_656537053"></script>
</head>
<body>
<div id="contents">
<ul id="nav">
<li><a href="#s01">01</a></li>
<li><a href="#s02">02</a></li>
<li><a href="#s03">03</a></li>
<li><a href="#s04">04</a></li>
<li><a href="#s05">05</a></li>
</ul>
<div id="s01" class="section">
<h2>SECTION 01</h2>
<p>1つ目のコンテンツ</p>
</div>
<div id="s02" class="section">
<h2>SECTION 02</h2>
<p>2つ目のコンテンツ</p>
</div>
<div id="s03" class="section">
<h2>SECTION 03</h2>
<p>3つ目のコンテンツ</p>
</div>
<div id="s04" class="section">
<h2>SECTION 04</h2>
<p>4つ目のコンテンツ</p>
</div>
<div id="s05" class="section">
<h2>SECTION 05</h2>
<p>5つ目のコンテンツ</p>
</div>
<!-- /#contents --></div>
</body>
</html>
<script type="text/javascript" src="index.js"></script>
</body>
</html>
@charset "utf-8";
/* ===================================================================
CSS information
file name : default.css
style info :
=================================================================== */
body {
background: #fff;
color: #222;
font:13px "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka,"MS Pゴシック", "MS PGothic","メイリオ", Meiryo,sans-serif,"宋体",Gulim;
*font-size:small;
*font:x-small;
line-height: 1.5;
}
* html body { /* for IF6 */
font-family: "MS Pゴシック","MS PGothic",Sans-Serif;
}
/* Font Size --------------------------------- */
p,li,dt,dd,th,td { font-size: 93%;}
li p,dd p,li li,dd li,th p,td p { font-size: 100%;}
h1,h2,h3,h4,h5,h6 { font-size: 100%;}
table { font-size: inherit; font-size: 100%;}
/* line-height --------------------------------- */
p,li,dt,dd,th,td { line-height: 1.58;}
/*Safari*/
body:first-of-type p,
body:first-of-type li,
body:first-of-type dt,
body:first-of-type dd,
body:first-of-type th,
body:first-of-type td { line-height: 1.58;}
/*IE6*/
* html p,
* html li,
* html dt,
* html dd,
* html th,
* html td { line-height: 1.54;}
* html p a,
* html li a { overflow: hidden!important;}
/*IE7*/
*:first-child+html p,
*:first-child+html li,
*:first-child+html dt,
*:first-child+html dd,
*:first-child+html th,
*:first-child+html td { line-height: 1.58; letter-spacing: 0.05em;}
/**/
/**/
html:not(:only-child:only-child) p,
html:not(:only-child:only-child) li,
html:not(:only-child:only-child) dt,
html:not(:only-child:only-child) dd,
html:not(:only-child:only-child) th,
html:not(:only-child:only-child) td { font-size: 100%;}
html:not(:only-child:only-child) h1,
html:not(:only-child:only-child) h2,
html:not(:only-child:only-child) h3,
html:not(:only-child:only-child) h4{ font-size: 116%;}
/**/
/* Common Links --------------------------------- */
a,a:link { color: #222; text-decoration: none; border-bottom: none; outline: none;}
a:visited { color: #222; text-decoration: none; border-bottom: none;}
a:hover { color: #666; text-decoration: none; border-bottom: none;}
a:active { color: #222; text-decoration: none; border-bottom: none;}
/* clearfix --------------------------------- */
nav ul:after,
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html nav ul,
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html nav ul,
*:first-child+html footer ul,
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
/* */
/*---------------------------------------------------------------------*/
/*------------------------------------------------------*/
/* noneImages */
/*------------------------------------------------------*/
img { vertical-align: bottom;}
.noneImages { display: none;}
.nf-message { display: none; }
/*------------------------------------------------------*/
/* for ie 6.7 */
/*------------------------------------------------------*/
#ie{ display: none; *display:block;}
#wrapper,#bg_cloud01,#bg_cloud02{
*display:none!important;
}
\ No newline at end of file
/* ================================================================================
*
* jQuery Page Scroller -version 3.0.8
* http://coliss.com/articles/build-websites/operation/javascript/296.html
* (c)2011 coliss.com
*
* この作品は、クリエイティブ・コモンズの表示 2.1 日本ライセンスの下で
* ライセンスされています。
* この使用許諾条件を見るには、http://creativecommons.org/licenses/by-sa/2.1/jp/を
* チェックするか、クリエイティブ・コモンズに郵便にてお問い合わせください。
* 住所は:559 Nathan Abbott Way, Stanford, California 94305, USA です。
*
================================================================================ */
/* ================================================================================
TOC
============================================================
Ooption
Page Scroller
============================================================
this script requires jQuery 1.3-1.4.4(http://jquery.com/)
================================================================================ */
/* ================================================================================
Ooption
================================================================================ */
var virtualTopId = "top",
virtualTop,
adjTraverser,
adjPosition,
callExternal = "pSc",
delayExternal= 200,
adjSpeed = 1;
/* option example
====================================================================== */
// virtualTop = 0; // virtual top's left position = 0
// virtualTop = 1; // virtual top's left position = vertical movement
// adjTraverser = 0; // left position = 0
// adjTraverser = 1; // horizontal movement.
// adjPosition = -26;
/* ================================================================================
Page Scroller
================================================================================ */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('(c($){7 C=$.H.C,w=$.H.w,F=$.H.F,A=$.H.A;$.H.1P({w:c(){3(!6[0])1H();3(6[0]==h)b 1K.1O||$.1D&&5.z.1x||5.f.1x;3(6[0]==5)b((5.z&&5.1G=="1s")?5.z.1u:5.f.1u);b w.1e(6,1f)},C:c(){3(!6[0])1H();3(6[0]==h)b 1K.1N||$.1D&&5.z.1F||5.f.1F;3(6[0]==5)b((5.z&&5.1G=="1s")?5.z.1d:5.f.1d);b C.1e(6,1f)},F:c(){3(!6[0])b 17;7 j=5.M?5.M(6[0].u):5.1h(6[0].u);7 k=1o 1r();k.x=j.19;1q((j=j.1j)!=V){k.x+=j.19}3((k.x*0)==0)b(k.x);g b(6[0].u)},A:c(){3(!6[0])b 17;7 j=5.M?5.M(6[0].u):5.1h(6[0].u);7 k=1o 1r();k.y=j.1m;1q((j=j.1j)!=V){k.y+=j.1m}3((k.y*0)==0)b(k.y);g b(6[0].u)}})})(1Q);$(c(){$(\'a[q^="#"], 20[q^="#"]\').22(\'.1k a[q^="#"], a[q^="#"].1k\').1a(c(){7 i=Q.21+Q.1Z;7 I=((6.q).25(0,(((6.q).13)-((6.15).13)))).R((6.q).1C("//")+2);3(i.G("?")!=-1)Y=i.R(0,(i.G("?")));g Y=i;3(I.G("?")!=-1)X=I.R(0,(I.G("?")));g X=I;3(X==Y){d.12((6.15).23(1));b 1T}});$("f").1a(c(){d.L()})});6.r=V;7 d={14:c(B){3(B=="x")b(($(5).w())-($(h).w()));g 3(B=="y")b(($(5).C())-($(h).C()))},W:c(B){3(B=="x")b(h.18||5.f.v||5.f.N.v);g 3(B=="y")b(h.1S||5.f.1c||5.f.N.1c)},P:c(l,m,D,p,o){7 r;3(r)J(r);7 1A=16*1X;7 S=d.W(\'x\');7 O=d.W(\'y\');3(!l||l<0)l=0;3(!m||m<0)m=0;3(!D)D=$.1E.1Y?10:$.1E.1W?8:9;3(!p)p=0+S;3(!o)o=0+O;p+=(l-S)/D;3(p<0)p=0;o+=(m-O)/D;3(o<0)o=0;7 U=E.1J(p);7 T=E.1J(o);h.1U(U,T);3((E.1I(E.1v(S-l))<1)&&(E.1I(E.1v(O-m))<1)){J(6.r);h.1i(l,m)}g 3((U!=l)||(T!=m))6.r=1n("d.P("+l+","+m+","+D+","+p+","+o+")",1A);g J(6.r)},L:c(){J(6.r)},24:c(e){d.L()},12:c(n){d.L();7 s,t;3(!!n){3(n==1M){s=(K==0)?0:(K==1)?h.18||5.f.v||5.f.N.v:$(\'#\'+n).F();t=((K==0)||(K==1))?0:$(\'#\'+n).A()}g{s=(1y==0)?0:(1y==1)?($(\'#\'+n).F()):h.18||5.f.v||5.f.N.v;t=1B?($(\'#\'+n).A())+1B:($(\'#\'+n).A())}7 11=d.14(\'x\');7 Z=d.14(\'y\');3(((s*0)==0)||((t*0)==0)){7 1t=(s<1)?0:(s>11)?11:s;7 1w=(t<1)?0:(t>Z)?Z:t;d.P(1t,1w)}g Q.15=n}g d.P(0,0)},1z:c(){7 i=Q.q;7 1l=i.1C("#",0);7 1b=i.1V(1g);3(!!1b){1p=i.R(i.G("?"+1g)+4,i.13);1R=1n("d.12(1p)",1L)}3(!1l)h.1i(0,0);g b 17}};$(d.1z);',62,130,'|||if||document|this|var||||return|function|coliss||body|else|window|usrUrl|obj|tagCoords|toX|toY|idName|frY|frX|href|pageScrollTimer|anchorX|anchorY|id|scrollLeft|width|||documentElement|top|type|height|frms|Math|left|lastIndexOf|fn|anchorPath|clearTimeout|virtualTop|stopScroll|getElementById|parentNode|actY|pageScroll|location|slice|actX|posY|posX|null|getWindowOffset|anchorPathOmitQ|usrUrlOmitQ|dMaxY||dMaxX|toAnchor|length|getScrollRange|hash||true|pageXOffset|offsetLeft|click|checkPageScroller|scrollTop|scrollHeight|apply|arguments|callExternal|all|scroll|offsetParent|nopscr|checkAnchor|offsetTop|setTimeout|new|anchorId|while|Object|CSS1Compat|setX|scrollWidth|abs|setY|clientWidth|adjTraverser|initPageScroller|spd|adjPosition|indexOf|boxModel|browser|clientHeight|compatMode|error|floor|ceil|self|delayExternal|virtualTopId|innerHeight|innerWidth|extend|jQuery|timerID|pageYOffset|false|scrollTo|match|opera|adjSpeed|mozilla|pathname|area|hostname|not|substr|cancelScroll|substring'.split('|'),0,{}));
\ No newline at end of file
# Mouse Wheel ChangeLog
# 3.0.6
* Fix issue with delta being 0 in Firefox
# 3.0.5
* jQuery 1.7 compatibility
# 3.0.4
* Fix IE issue
# 3.0.3
* Added deltaX and deltaY for horizontal scrolling support (Thanks to Seamus Leahy)
# 3.0.2
* Fixed delta being opposite value in latest Opera
* No longer fix pageX, pageY for older mozilla browsers
* Removed browser detection
* Cleaned up the code
# 3.0.1
* Bad release... creating a new release due to plugins.jquery.com issue :(
# 3.0
* Uses new special events API in jQuery 1.2.2+
* You can now treat "mousewheel" as a normal event and use .bind, .unbind and .trigger
* Using jQuery.data API for expandos
# 2.2
* Fixed pageX, pageY, clientX and clientY event properties for Mozilla based browsers
# 2.1.1
* Updated to work with jQuery 1.1.3
* Used one instead of bind to do unload event for clean up.
# 2.1
* Fixed an issue with the unload handler
# 2.0
* Major reduction in code size and complexity (internals have change a whole lot)
# 1.0
* Fixed Opera issue
* Fixed an issue with children elements that also have a mousewheel handler
* Added ability to handle multiple handlers
# jQuery Mouse Wheel Plugin
A jQuery plugin that adds cross-browser mouse wheel support.
In order to use the plugin, simply bind the "mousewheel" event to an element. It also provides two helper methods called `mousewheel` and `unmousewheel` that act just like other event helper methods in jQuery. The event callback receives three extra arguments which are the normalized "deltas" of the mouse wheel.
Here is an example of using both the bind and helper method syntax.
// using bind
$('#my_elem').bind('mousewheel', function(event, delta, deltaX, deltaY) {
console.log(delta, deltaX, deltaY);
});
// using the event helper
$('#my_elem').mousewheel(function(event, delta, deltaX, deltaY) {
console.log(delta, deltaX, deltaY);
});
## License
This plugin is licensed under the MIT License (LICENSE.txt).
Copyright (c) 2011 [Brandon Aaron](http://brandonaaron.net)
Copyright 2011, Brandon Aaron (http://brandonaaron.net/)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*--------------------------------------------------------------------------*
*
* SmoothScroll JavaScript Library V2
*
* MIT-style license.
*
* 2007-2011 Kazuma Nishihata
* http://www.to-r.net
*
*--------------------------------------------------------------------------*/
new function(){
var attr ="data-tor-smoothScroll";//for html5 , if you can't use html5 , this value change "class"
var attrPatt = /noSmooth/;
var d = document;//document short cut
/*
*add Event
-------------------------------------------------*/
function addEvent(elm,listener,fn){
try{ // IE
elm.addEventListener(listener,fn,false);
}catch(e){
elm.attachEvent(
"on"+listener
,function(){
fn.apply(elm,arguments)
}
);
}
}
/*
*Start SmoothScroll
-------------------------------------------------*/
function SmoothScroll(a){
if(d.getElementById(a.rel.replace(/.*\#/,""))){
var e = d.getElementById(a.rel.replace(/.*\#/,""));
}else{
return;
}
//Move point
var end=e.offsetTop
var docHeight = d.documentElement.scrollHeight;
var winHeight = window.innerHeight || d.documentElement.clientHeight
if(docHeight-winHeight<end){
var end = docHeight-winHeight;
}
//Current Point
var start=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop || 0;
var flag=(end<start)?"up":"down";
function scrollMe(start,end,flag) {
setTimeout(
function(){
if(flag=="up" && start >= end){
start=start-(start-end)/20-1;
window.scrollTo(0,start)
scrollMe(start,end,flag);
}else if(flag=="down" && start <= end){
start=start+(end-start)/20+1;
window.scrollTo(0,start)
scrollMe(start,end,flag);
}else{
scrollTo(0,end);
}
return ;
}
,10
);
}
scrollMe(start,end,flag);
}
/*
*Add SmoothScroll
-------------------------------------------------*/
addEvent(window,"load",function(){
var anchors = d.getElementsByTagName("a");
for(var i = 0 ,len=anchors.length; i<len ; i++){
if(!attrPatt.test(anchors[i].getAttribute(attr)) &&
anchors[i].href.replace(/\#[a-zA-Z0-9_]+/,"") == location.href.replace(/\#[a-zA-Z0-9_]+/,"")){
anchors[i].rel = anchors[i].href;
anchors[i].href = "javascript:void(0)";
anchors[i].onclick=function(){SmoothScroll(this)}
}
}
});
}
\ No newline at end of file
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.6
*
* Requires: 1.2.2+
*/
(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery)
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.6
*
* Requires: 1.2.2+
*/
(function($) {
var types = ['DOMMouseScroll', 'mousewheel'];
if ($.event.fixHooks) {
for ( var i=types.length; i; ) {
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
}
}
$.event.special.mousewheel = {
setup: function() {
if ( this.addEventListener ) {
for ( var i=types.length; i; ) {
this.addEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i=types.length; i; ) {
this.removeEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
},
unmousewheel: function(fn) {
return this.unbind("mousewheel", fn);
}
});
function handler(event) {
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
event = $.event.fix(orgEvent);
event.type = "mousewheel";
// Old school scrollwheel delta
if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
// New school multidimensional scroll (touchpads) deltas
deltaY = delta;
// Gecko
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaY = 0;
deltaX = -1*delta;
}
// Webkit
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
return ($.event.dispatch || $.event.handle).apply(this, args);
}
})(jQuery);
@charset "utf-8";
/*------------------------------------------------------*/
/* reset */
/*------------------------------------------------------*/
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.1.0
build: 2026
*/
html{color:#000;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
\ No newline at end of file
@charset "utf-8";
/* ===================================================================
CSS information
file name : import.css
style info :
=================================================================== */
/* reset Style -
----------------------------------------------------------- */
@import url("reset.css");
/* default Style -
----------------------------------------------------------- */
@import url("default.css");
/* common Style -
----------------------------------------------------------- */
@import url("style.css");
/* about Style -
----------------------------------------------------------- */
@import url("home.css");
/* print Style -
----------------------------------------------------------- */
@import url("print.css");
/* shadowbox Style -
----------------------------------------------------------- */
@import url("prettyPhoto.css");
/* google maps Style -
----------------------------------------------------------- */
@import url("http://code.google.com/apis/maps/documentation/javascript/examples/default.css");
<!doctype html>
<html>
<head>
<title>Testing mousewheel plugin</title>
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-git.js"></script>-->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.js"></script>
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"></script>-->
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.js"></script>-->
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>-->
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.3.2.js"></script>-->
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.2.6.js"></script>-->
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.2.2.js"></script>-->
<script type="text/javascript" src="../jquery.mousewheel.js"></script>
<style>
#test1 {
background-color: #000;
width: 120px;
height: 100px;
color: #fff;
float: left;
}
#test2 {
background-color: #333;
width: 120px;
height: 100px;
color: #fff;
float: left;
}
#test3 {
background-color: #666;
width: 120px;
height: 100px;
color: #fff;
float: left;
}
#test4 {
background-color: #000;
width: 120px;
height: 100px;
color: #fff;
float: left;
}
#test5 {
background-color: #333;
padding: 5px;
width: 400px;
height: 400px;
color: #fff;
float: left;
}
#test6 {
background-color: #666;
padding: 5px;
width: 250px;
height: 250px;
color: #fff;
float: left;
}
#test7 {
background-color: #000;
padding: 5px;
width: 100px;
height: 100px;
color: #fff;
float: left;
}
#forceScroll {
clear: both;
height: 1000px;
}
#logger {
position: absolute;
top: 395px;
left: 12px;
width: 460px;
height: 290px;
overflow: auto;
}
#logger p {
font-family: Arial, sans-serif;
font-size: 13px;
padding: 2px;
border-bottom: 1px solid #ccc;
margin: 0;
}
#logger p:nth-child(even) {
background-color: #FFFFE8;
}
#logger p:nth-child(10n) {
border-bottom-color: #000;
}
</style>
<script type="text/javascript">
$(function() {
$('#userAgent').html(navigator.userAgent);
$('#test1')
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test1: up ('+delta+')';
else if (delta < 0)
o = '#test1: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o );
log('pageX: ' + event.pageX + ' pageY: ' + event.pageY );
});
$('#test2')
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test2: up ('+delta+')';
else if (delta < 0)
o = '#test2: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o );
return false; // prevent default
});
$('#test3')
.hover(function() { log('#test3: mouseover'); }, function() { log('#test3: mouseout'); })
.mousewheel(function(event, delta, deltaX, deltaY) {
log('#test3: I should not have been logged');
})
.unmousewheel();
var testRemoval = function(event, delta, deltaX, deltaY) {
log('#test4: I should not have been logged');
};
$('#test4')
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test4: up ('+delta+')';
else if (delta < 0)
o = '#test4: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o );
return false;
})
.mousewheel(testRemoval)
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test4: up ('+delta+')';
else if (delta < 0)
o = '#test4: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o + ' from 2nd handler' );
return false;
})
.unmousewheel(testRemoval);
$('#test5')
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test5: up ('+delta+')';
else if (delta < 0)
o = '#test5: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o );
event.stopPropagation();
event.preventDefault();
});
$('#test6')
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test6: up ('+delta+')';
else if (delta < 0)
o = '#test6: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o );
event.stopPropagation();
event.preventDefault();
});
$('#test7')
.mousewheel(function(event, delta, deltaX, deltaY) {
var o = '';
if (delta > 0)
o = '#test7: up ('+delta+')';
else if (delta < 0)
o = '#test7: down ('+delta+')';
if (deltaX > 0)
o = o + ', east ('+deltaX+')';
else if (deltaX < 0)
o = o + ', west ('+deltaX+')';
if (deltaY > 0)
o = o + ', north ('+deltaY+')';
else if (deltaY < 0)
o = o + ', south ('+deltaY+')';
if( o != '' )
log( o );
event.preventDefault();
});
function log(msg) {
$('#logger').append('<p>'+msg+'</p>').scrollTop(999999);
};
});
</script>
</head>
<body>
<h1 id="banner">jQuery mousewheel.js - Test</h1>
<h2 id="userAgent"></h2>
<ul>
<li><strong>Test1</strong> is just using the plain on mousewheel() with a function passed in and does not prevent default. (Also logs the value of pageX and pageY event properties.)</li>
<li><strong>Test2</strong> should prevent the default action.</li>
<li><strong>Test3</strong> should only log a mouseover and mouseout event. Testing unmousewheel().</li>
<li><strong>Test4</strong> has two handlers.</li>
<li><strong>Test5</strong> is like Test2 but has children. The children should not scroll until mousing over them.</li>
<li><strong>Test6</strong> is like Test5 but should not scroll children or parents.</li>
<li><strong>Test7</strong> is like Test6 but has no children. It will propagate the event and scroll test 6 as well.</li>
</ul>
<div id="test1"><p>Test1</p></div>
<div id="test2"><p>Test2</p></div>
<div id="test3"><p>Test3</p></div>
<div id="test4"><p>Test4</p></div>
<div id="test5">
<p>Test5</p>
<div id="test6">
<p>Test6</p>
<div id="test7"><p>Test7</p></div>
</div>
</div>
<div id="logger"></div>
<div id="forceScroll"></div>
</body>
</html>
No preview for this file type
@charset "utf-8";
/* ===================================================================
CSS information
file name : default.css
style info :
=================================================================== */
body {
background: #fff;
color: #222;
font:13px "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka,"MS Pゴシック", "MS PGothic","メイリオ", Meiryo,sans-serif,"宋体",Gulim;
*font-size:small;
*font:x-small;
line-height: 1.5;
}
* html body { /* for IF6 */
font-family: "MS Pゴシック","MS PGothic",Sans-Serif;
}
/* Font Size --------------------------------- */
p,li,dt,dd,th,td { font-size: 93%;}
li p,dd p,li li,dd li,th p,td p { font-size: 100%;}
h1,h2,h3,h4,h5,h6 { font-size: 100%;}
table { font-size: inherit; font-size: 100%;}
/* line-height --------------------------------- */
p,li,dt,dd,th,td { line-height: 1.58;}
/*Safari*/
body:first-of-type p,
body:first-of-type li,
body:first-of-type dt,
body:first-of-type dd,
body:first-of-type th,
body:first-of-type td { line-height: 1.58;}
/*IE6*/
* html p,
* html li,
* html dt,
* html dd,
* html th,
* html td { line-height: 1.54;}
* html p a,
* html li a { overflow: hidden!important;}
/*IE7*/
*:first-child+html p,
*:first-child+html li,
*:first-child+html dt,
*:first-child+html dd,
*:first-child+html th,
*:first-child+html td { line-height: 1.58; letter-spacing: 0.05em;}
/**/
/**/
html:not(:only-child:only-child) p,
html:not(:only-child:only-child) li,
html:not(:only-child:only-child) dt,
html:not(:only-child:only-child) dd,
html:not(:only-child:only-child) th,
html:not(:only-child:only-child) td { font-size: 100%;}
html:not(:only-child:only-child) h1,
html:not(:only-child:only-child) h2,
html:not(:only-child:only-child) h3,
html:not(:only-child:only-child) h4{ font-size: 116%;}
/**/
/* Common Links --------------------------------- */
a,a:link { color: #222; text-decoration: none; border-bottom: none; outline: none;}
a:visited { color: #222; text-decoration: none; border-bottom: none;}
a:hover { color: #666; text-decoration: none; border-bottom: none;}
a:active { color: #222; text-decoration: none; border-bottom: none;}
/* clearfix --------------------------------- */
nav ul:after,
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html nav ul,
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html nav ul,
*:first-child+html footer ul,
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
/* */
/*---------------------------------------------------------------------*/
/*------------------------------------------------------*/
/* noneImages */
/*------------------------------------------------------*/
img { vertical-align: bottom;}
.noneImages { display: none;}
.nf-message { display: none; }
/*------------------------------------------------------*/
/* for ie 6.7 */
/*------------------------------------------------------*/
#ie{ display: none; *display:block;}
#wrapper,#bg_cloud01,#bg_cloud02{
*display:none!important;
}
\ No newline at end of file
@charset "utf-8";
/* ===================================================================
CSS information
file name : import.css
style info :
=================================================================== */
/* reset Style -
----------------------------------------------------------- */
@import url("reset.css");
/* default Style -
----------------------------------------------------------- */
@import url("default.css");
/* common Style -
----------------------------------------------------------- */
@import url("style.css");
/* about Style -
----------------------------------------------------------- */
@import url("home.css");
/* print Style -
----------------------------------------------------------- */
@import url("print.css");
/* shadowbox Style -
----------------------------------------------------------- */
@import url("prettyPhoto.css");
/* google maps Style -
----------------------------------------------------------- */
@import url("http://code.google.com/apis/maps/documentation/javascript/examples/default.css");
@charset "utf-8";
/*------------------------------------------------------*/
/* reset */
/*------------------------------------------------------*/
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.1.0
build: 2026
*/
html{color:#000;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
\ No newline at end of file
body { background-color:#d6d6d6;}
/* #header #footer */
#header,
#footer { width: 100%; background: #000}
#header .header_inner,
#footer .footer_inner { margin: 0 auto; width: 864px;}
/**/
#header h1 { float: left; margin-top:10px; width: 325px; height: 40px; background:url(../img/header_SORA.png) no-repeat 0 0;}
#header h1 a { display: block; width: 80px; height: 40px; text-indent: -10000px;}
#header p {float: right; margin-top:5px; width: 131px;}
#footer p { padding: 4px; font-size: 10px; color: #fff; text-align: right;}
/* #contents */
#contents { margin: 0 auto; width: 946px; padding: 0; background: url(../img/bg_contents.gif) repeat-y center top;}
h1#mainVisual { margin: 0 auto; width: 760px; height:600px; background: url(../img/mainVisual.png) no-repeat center 0; text-indent: -10000px;}
.contents_inner { margin: 0 auto; padding: 60px 60px 10px 60px; width: 640px; background: url(../img/bg_contents_inner.jpg) repeat-y 0 0;}
.section { margin-bottom: 50px;}
.section h2{ display: none;}
.section p { margin-bottom: 1em; font-size: 17px; color: #000;}
.section strong { font-weight: bold; font-size: 19px;}
.section img { margin-bottom: 0.5em; border: 3px solid #000;}
#contents_footer { margin: 0 auto; width: 760px; padding-top: 12px; background: url(../img/line.gif) repeat-x 0 0;}
#contents_footer .section { padding-top: 20px;}
#bookmarklet { margin: 50px auto; width: 400px;}
#bookmarklet li { float: left; width: 100px;}
#likeBox { margin-top: 100px;}
#likeBox #likeBox_inner { background-color: #fff;}
.lazy { background: url(../img/photo/loader.gif) no-repeat center center;}
/* noscript --------------------------------- */
/* clearfix --------------------------------- */
#header .header_inner:after,
#bookmarklet:after,
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html #header .header_inner,
* html #bookmarklet,
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html #header .header_inner,
*:first-child+html #bookmarklet,
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment