-2

It is possible to add !important in animate? I tried adding like that in angular:

angular.element(".myClassName").css("margin-left","100px !important"); 
halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    No...you can't do that and there are numerous posts on this site with explanations and alternatives ...http://stackoverflow.com/questions/2655925/how-to-apply-important-using-css – charlietfl Jul 22 '15 at 11:14

1 Answers1

0

We can create a class say

.marginleft100px {
     margin-left: 100px !important;
}

and we can add this class using addClass(); instead using .css().

Hoping this will work.

  • Please refer this **http://stackoverflow.com/questions/2655925/how-to-apply-important-using-css** for solution. –  Jul 22 '15 at 11:15
  • we need to use .animate() –  Jul 22 '15 at 12:21
  • In animate there is only three properties like div.animate({height: 300}, "slow"); – kuldeep kamble Jul 22 '15 at 15:30
  • Hope you referred this [link](http://stackoverflow.com/questions/9931122/how-to-use-important-in-jquery-animate-function). Try those and let me know. –  Jul 23 '15 at 03:46