Skip to content

Instantly share code, notes, and snippets.

@andredublin
Created August 31, 2011 19:48
Show Gist options
  • Save andredublin/1184516 to your computer and use it in GitHub Desktop.
Save andredublin/1184516 to your computer and use it in GitHub Desktop.
start of selecable menu hover effect, jquery plugin idea
function selectable() {
var arrow = "<div class='arrow'><p>Hey</p></div>";
$('.selectable').css('position','relative');
$(arrow).css('position','absolute');
$('.selectable').append(arrow);
}
selectable();
// starting arrow on the first index
// cache the height of the ul
// the arrow will be centered by the height/2 of the current li
// onclick find the height of the current li
// animate the arrow position by the height of the ul - the height of the li + the center of the li
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment