closest vs parents

JavaScript performance comparison

Revision 7 of this test case created by Anup

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div data-args='{"test":0}" id="test0">

Preparation code output