I have the following jQuery code:
var shown = $('div.slideshow').find('div.slide:visible');
var next = shown.next();
if(next == '') {
console.log('empty');
}
Basically when the next comes back as empty like: [] I want to be able to detect this. How do I do it?
Use
lengthproperty, which contains number of elements within jQuery object:or: