After looking at jQuery selector with variable in the selector and a few other posts, I'm not finding an answer to my question, which makes me think maybe I'm maybe going about it wrong.
I have a .car_ul li element being passed in as 'el',
I'm trying to operate on $('.car_ul:not(:animated)') using $(':not(:animated)',adult) - wondering how I can do that?
slideLeft: function(el) {
var adult = el.parent.attr('class')
var itemWidth = el.outerWidth() + 10
var leftIndent = parseInt(adult.css('left')) + itemWidth
$('.car_ul:not(:animated)').animate({'left' : leftIndent}, 500,
function() {
$('.car_ul li:first').before($('.car_ul li:last'))
$(adult).css({'left':'-160px'})
})
},
className, FYI. the object version of adult should have worked. Provide html required to recreate your problem and we may be able to help further..attr('class').el.parentNode.classNameworks just fine, and much faster..car_ulelements or descendants of the.car_ulelements. Also, it'd probably be a lot easier to understand if you just posted your code instead of trying to talk through it.