Possible Duplicate:
Fire jQuery event on div change
I'm using this tiny plugin to watch for changes in the html: https://github.com/jacobrelkin/jquery-watcher
This works fine, the problem is I need the if condition
to validate if it's over 2 times, reason being when the gallery loads and it shifts left and right creates the -moz-grabbing
condition twice onload.
I tried doing
if( $('#gallery-1').has('div').css('cursor', '-moz-grabbing') > 2)
if( $('#gallery-1').has('div').css('cursor', '-moz-grabbing').length > 2)
I also tried putting it in a variable then doing > 2
None of the above seem to be working not sure what I'm doing wrong?
$('.sliderContainer').watch('innerHTML', function() {
if( $('#gallery-1').has('div').css('cursor', '-moz-grabbing') ) {
console.log($('#gallery-1').has('div').css('cursor', '-moz-grabbing'));
$('#collapse_content_1').toggleClass('collapse_inner_off');
}
});