Ticket #3666 (closed enhancement: fixed)
Remove dead code from $(fn) shortcut for $(document).ready(fn)
|Reported by:||geary||Owned by:||flesler|
The code for the $(fn) shortcut is:
return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
It's unclear what the intent of this code was, but the jQuery.fn.ready test has no effect. jQuery.fn.ready always exists, so the code is the equivalent of:
return jQuery( document ).ready( selector );
That also matches people's expectation that $(fn) is the exact equivalent of $(document).ready(fn).
The attached patch removes this dead code.
- Cc geary added
- Owner set to flesler
- Status changed from new to assigned
- Status changed from assigned to closed
- Resolution set to fixed