I'm using jqLite in AngularJS.
Basically I'm adding some custom CSS properties like this:
$scope.$on('scrollEvent', function(){
if (a < 5){
a = a + 1/20;
$element.css({
'-webkit-filter': 'blur('+ a +'px)',
'margin': '-'+ a +'px'
});
}
if (inView()){
a = 0;
$element.css({
'-webkit-filter': '',
'margin': ''
});
}
})
I can't change or remove margin property value because it's negative, it will get changed only if it's positive.
Why is that?