Use .width() to decrease width of element
Hello,
Is the next jQuery code the best way to decrease an elements width?
- $('#myelement').width( $('#myelement').width() - 20 );
I tried using the next code:
- $('#myelement').width( '-=20' );
but that's not working, also not with '-20'.
Maybe it's an idea to add this functionality? It's is already used in the .animate() function for changing the position of an element.