jquery comment

jQuery API 1.4.4 Chinese version chm download

http://www.skygq.com/2011/01/01/jquery%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95%E6%80%BB%E7%BB%93/

 

$("#id").text("hello");

$("#id").html("<strong>hello</strong>");

$("#btn").click(function(){xxx});

$("#btn").click(xxx);

$("#btn").on("click",function(){xx});

 

<html>
    <button id="add">Add new</button>
    <div id="container">
        <button class="alert">alert!</button>
    </div>
</html>

<script>
$("button#add").click(function() {
    var html = "<button class='alert'>Alert!</button>";
    $("button.alert:last").parent().append(html);
});
</script>

 

 

 

 

with unbinding via

$("#element").off("click.someNamespace");

 

$("#whatever").trigger("click");

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326998101&siteId=291194637