Skip to content

Instantly share code, notes, and snippets.

@surajsau
Created March 25, 2020 13:24
Show Gist options
  • Save surajsau/bf67985e0c44912ffc1b45a23e5e71b1 to your computer and use it in GitHub Desktop.
Save surajsau/bf67985e0c44912ffc1b45a23e5e71b1 to your computer and use it in GitHub Desktop.
function checkVisibleItem(element) {
//1
let base = $('.slider-item').add(element);
base.filter((index, element) => {
//2
return $(element).attr('class').match(/slider-item-\d+/);
}).each((index, element) => {
//3
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment