Answer the question
In order to leave comments, you need to log in
How to add css value with jQuery?
Such cases: there is an element. The element has a padding-top. I need to increase this padding-top by some value.
As far as I remember (I saw it somewhere), this type of record is:
Is this the right way?
$(element).css('padding-top', + value);
Answer the question
In order to leave comments, you need to log in
+= it is necessary, then it will be to add an arbitrary indent to the indent already received.
$(element).css('padding-top', parseFloat($(element).css('padding-top'))+ value);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question