Use jQuery.contains to check if view.el is in DOM

Instead of [Node.contains](https://developer.mozilla.org/en-US/docs/Web/API/Node.contains). In particular, fixes compatibility with Firefox < 9.