Skip to content

Commit

Permalink
incremental change as part of a frenzy of activity
Browse files Browse the repository at this point in the history
  • Loading branch information
codetojoy committed Jan 30, 2016
1 parent 64f4427 commit 00c5ff2
Showing 1 changed file with 100 additions and 0 deletions.
100 changes: 100 additions & 0 deletions index.html
@@ -0,0 +1,100 @@

<html>
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/cupertino/jquery-ui.min.css"></link>

<script>
$(function() {
$( "#accordion" ).accordion({ autoHeight : false, clearStyle : true, event: "click hoverintent"});
$( ".link" ).button();
});

/*
* hoverIntent | Copyright 2011 Brian Cherne
* http://cherne.net/brian/resources/jquery.hoverIntent.html
* modified by the jQuery UI team
*/
$.event.special.hoverintent = {
setup: function() {
$( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
},
teardown: function() {
$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
},
handler: function( event ) {
var currentX, currentY, timeout,
args = arguments,
target = $( event.target ),
previousX = event.pageX,
previousY = event.pageY;

function track( event ) {
currentX = event.pageX;
currentY = event.pageY;
};

function clear() {
target
.unbind( "mousemove", track )
.unbind( "mouseout", clear );
clearTimeout( timeout );
}

function handler() {
var prop,
orig = event;
if ( ( Math.abs( previousX - currentX ) +
Math.abs( previousY - currentY ) ) < 7 ) {
clear();
event = $.Event( "hoverintent" );
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
// Prevent accessing the original event since the new event
// is fired asynchronously and the old event is no longer
// usable (#6028)
delete event.originalEvent;
target.trigger( event );
} else {
previousX = currentX;
previousY = currentY;
timeout = setTimeout( handler, 100 );
}
}
timeout = setTimeout( handler, 100 );
target.bind({
mousemove: track,
mouseout: clear
});
} // handler
};
</script>
</head>
<body>
<div id="accordion">
<h3><a href='#'>Exchanges</a></h3>
<div>
<a class='link' href='http://stackoverflow.com'>Stack Overflow</a> <br/>
<a class='link' href='http://superuser.com'>Super User</a> <br/>
<a class='link' href='http://english.stackexchange.com'>English</a> <br/>
<a class='link' href='http://music.stackexchange.com'>Music</a> <br/>
<a class='link' href='http://programmers.stackexchange.com'>Programmer's</a> <br/>
</div>
<h3><a href='#'>Blogs</a></h3>
<div>
<a class='link' href='http://codetojoy.blogspot.com'>Code to Joy</a> <br/>
<a class='link' href='http://lickoftheday.blogspot.com'>Lick of the Day</a> <br/>
<a class='link' href='http://pedalingpei.blogspot.com'>Pedaling PEI</a> <br/>
</div>
<h3><a href='#'>Tech</a></h3>
<div>
<a class='link' href='http://apple.stackexchange.com/questions/400/please-share-your-hidden-os-x-features-or-tips-and-tricks'>Mac OS X tips</a> <br/>
</div>

</div>
</body>
</html>

0 comments on commit 00c5ff2

Please sign in to comment.