Support for dom elements and collections.

I've created this PR because I need it in a project of mine. 

If you like the idea I can improve it. Basically now it possible to pass a collection or a dom element instead of a selector.