> I'm trying to trigger an event only when a condition is met, > > $(document).ready(function() { > $('#leftScroll').click(function() { > $('#scrollContent') > .animate( > { > left: '+=900' > }, > 'slow'); > }); > }); > > I only want '#scrollContent' to move if its position is not 'left: 10' > > I've tried using .offset() and .position() both with no luck > > if($('#scrollContent').position() != left: 10) { do stuff} else { do nothing > > } > > I'm familiar with ActionScript conditional principles but I get no results > when I try here. > > any help would be greatly appreciated...
maybe this? if ( $('#scrollContent').css('left') != 10) ) { // do stuff }