Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
incremental change as part of a frenzy of activity
- Loading branch information
Showing
1 changed file
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |