Add more functions to `$`

- `attr`
- `closest`
- `each`
- `length`