jQuery code snippet to get id of visible element.
Use the visible selector to get the visible element.
Use the not selector to get the elements that are not visible.
For Example, to get the id of the form that is currently in view.
var $visibleForm = $('form:visible'), formId = $visibleForm.attr('id'); console.log(formId);
SitePoint WordPress Restaurant Theme
Pull in the crowds to your eatery, cafe, restaurant or bar with this flexible, modular WordPress theme.
SitePoint WordPress Ecommerce Theme
Sell your wares with this delightfully elegant WooCommerce-powered WordPress theme.
SitePoint WordPress Portfolio Theme
A beautiful, responsive, portfolio theme for creatives - photographers, designers, writers, developers - that shows off your skills and work to potential clients.
Tighten up your programming with strong typing, through TypeScript
You botter believe it, Microsoft are aiming for the Skypes
Breakdown your code and make it more maintainable...why wouldn't you?
ECMAScript 2015: A SitePoint Anthology
Jump Start Git
Take control of your code
It’s clean, it’s lean—it’s the MEAN Stack
A Guide to Testing and Debugging Node Applications
Mike Cantelon demonstrates various strategies for testing Node applications and offers some handy tips and tricks for debugging failing...