I'm new to jQuery and I'm still learning so I apologise if this is a silly question!
Basically I'm trying to get the number of elements in my page with a certain class. My searching tells me I need to use .length but it's not working for some reason.
Any ideas at a quick glance at what may be causing the issue?
var item = $('.item')
var itemWidth = item.width();
var numberItems = item.length();
console.log(numberItems);
Thanks!!