I’m sure I’m just having a brain fart and I’m missing something obvious, but please help.
I can’t figure out why the following code (the early coding of a custom slide show) is not ruining when the document loads.
$(document).ready(function() {
var numSlides = $('#slides .slide').length();
var wrapperWidth = $('#homeBanner').width();
var totalWidth = numSlides * wrapperWidth;
// set width of #slides to width of all .slide elements added together
$('#slides').css('width', totalWidth+'px');
}); // end document.ready()
Length is a property, not a method.