Are you first timer at lazacode.org? Why not join us and start exchange your knowledge with everyone. Register today!

jQuery .prop() general attributes

0 votes
3 views
added Apr 2 in jQuery by LC Marshal Second Warrant Officer (6,690 points)
$('#block-agent-contact input,#block-agent-contact textarea').prop("disabled", true);

1 Example

0 votes
responded Apr 5 by LC Marshal Second Warrant Officer (6,690 points)
edited Apr 5 by LC Marshal

Add and remove a property named "color":

$(document).ready(function(){
    $("button").click(function(){
        var $x = $("div");
        $x.prop("color", "FF0000");
        $x.append("The color property has the following value: " + $x.prop("color"));
        $x.removeProp("color");
        $x.append("<br>Now the color property has the following value: " + $x.prop("color"));
    });
});
lazacode.org - Malaysia based Knowledge Exchange Platform, where you can share your finding or solution with other members of community.
...