Fix in newer jQuery versions.

http://api.jquery.com/selector/ removed so I created a simple workaround which should work in most cases. For personal use really, but feel free to pull.