jQuery Find First Visible Element Plugin
Plugin to track the top-most visible element of a specific class. Handy for highlighting blog posts, attaching keyboard shortcuts to a specific element, or some wonderful thing we haven't thought of yet. The tracked element has a CSS class applied to it so it can be visually styled, or you can assign a callback that gets both the new top-most element as well as a reference to the one that was previously top-most so you can manipulate them via script.
- jquery.firstVisible.js (1.8k)
- jquery.firstVisible.min.js (0.5k)
- This plugin is released under the MIT License
View default options demo to see it in action.
See a demo with a callback function for a slightly more advanced example.
Like this? Want to help keep the free stuff flowing? Buy us a cup of coffee! We're not all fancy-pants, so it's under two bucks!