How to add a css value using jQuery?

This just in: there is an element of. The item has padding-top. I need this padding-top to increase by some value.

As far as I remember (somewhere saw), this kind of record:
$(element).css('padding-top', + value);

This is the right way?
July 8th 19 at 15:52
2 answers
July 8th 19 at 15:54
+= it is necessary, then you will have already obtained the offset, add random.
July 8th 19 at 15:56
$(element).css('padding-top', parseFloat($(element).css('padding-top'))+ value);
cumbersome - Durward_Osinski commented on July 8th 19 at 15:59

Find more questions by tags FrontendCSSJavaScriptHTMLjQuery