我想做的是创建一个变量,它是一个特定的类/id对象。例如,在行(5)和(8)中,我对ID、鞋-旋转木马进行文字引用,我希望有一个变量来表示鞋-旋转木马。问题是,如果我做这样的事情:
var fooCarousel = $('.shoe-carousel');
它适用于线路(5),而不是行(8)。
1. //initialize the slide in focus and what will be the center slide
2. var slideInFocus = document.createElement('img');
3.
4. //set