mythz/jquip — pull request #50 by zipang (2012-11-01 15:33:28+00:00)
Title: .attr() and .removeAttr() should not fail on text nodes

Hi there ! :)
It's not so usual that you accidently stumble on text nodes within a `$().each()`, but it can happen when dealing with document fragments..
Calling `.attr()` and `.removeAttr()` on this nodes should not fail.
I added some test cases.

When adding this correction to `attr()` i couldn't help but be warned against some ugly code dealing with input text elements..

```js
function attr(el, name) {
return (el && el.nodeName === 'INPUT' && el.type === 'text' && name === 'value')
? el.value
: (el ? (el.getAttribute(name) || (name in el ? el[name] : undefined)) : null);
}
```

I'm sure we could get rid of this special case (but is it really one ?) so i tried..
And anyway, `.attr()` should be deprecated in favor of `.val()` when dealing with input values no ?
What do you think ?

It should be a good idea to try to re-run the test suite on some IE6/7..