Created
April 14, 2014 16:29
-
-
Save jbutko/10663225 to your computer and use it in GitHub Desktop.
jQuery: Get index of hovered element
This file contains hidden or 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
$(document).ready(function () { | |
$('.around li').hover(function () { | |
var index = $('.around li').index(this); | |
console.log(index); | |
}, function () { }); | |
}); | |
// From http://stackoverflow.com/questions/11294012/jquery-get-index-of-hovered-li |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment