jQuery Element Removed? (v74)

Revision 74 of this benchmark created on


Description

Checks if a DOM element has been removed; returns true if in DOM, false if removed.

Updated to jquery 1.9.1.

Preparation HTML

<div id="element"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

Setup

var removed = $('#element').remove();
    var inDom = $('#tests');

Test runner

Ready to run.

Testing in
TestOps/sec
$.contains inDom $obj
$.contains(document.documentElement, inDom);
ready
$.contains removed $obj
$.contains(document.documentElement, removed);
ready
jQuery.contains inDom $obj
jQuery.contains(document.documentElement, inDom);
ready
jQuery.contains removed $obj
jQuery.contains(document.documentElement, removed);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.