3 ms·
I was wondering about that too. It seems like they're trying to remove an attribute... which is what $old.removeAttr('margin-left') is meant for.
by Groxx 15y ago
I was wondering about that too. It seems like they're trying to remove an attribute... which is what $old.removeAttr('margin-left') is meant for.
- 0atman 15y ago$old.removeAttr("margin-left") doesn't work for some reason (in Chrome), hence I went for the get(0) way. I'd be interested to know why it doesn't work...
- Groxx 15y agoOh, hah, sorry - that's manipulating styles. Though I'm not sure why .css('attr', '') didn't work. I've been diving into the depths of jQuery more lately though, and every time I do I find new and... interesting things... my suggestion is to read the source. There are some wonky things in there that'll explain a lot of weird, edge-casey behavior.