Can the .ready () event be used in tags other than the document? Example:
$("#test").ready(function() { $("#test").click(function () { alert("test"); }); });
Quote .ready()documentation page :
.ready()
The method .ready()can only be a jQuery object call corresponding to the current document
The selector can be omitted, but it will not change anything: it will still work on the document.
$( "# test" ). ready , , #test dom . @ZeSimon , , #test dom. ajax, dom , click .
a > 0 , #test , , .
#test ajax,
live ('click') [ ajax]
, , $(document).ready(), ?