开发者

change css inline using jquery

I 开发者_运维问答have a button like this

<input type="button" id="btnEdit" value="Edit Selected" class="emrBTN" style="top:5;right:95;width:100; visibility:hidden" />

I want to change the visibility to visible using jquery onclick ob a button event. How can I do that. Thanks


jQuery('#btnEdit').css('visibility', 'visible');

It is very near the top of the CSS section of the documentation.


Solution here: http://jsfiddle.net/hY3eg/

HTML:

<input type="button" value="Make Visible" id="makeVisible"/>

<input type="button" id="btnEdit" value="Edit Selected" class="emrBTN" style="top:5;right:95;width:100; visibility:hidden" />

JS:

$(function() {
    $("#makeVisible").click(function() {
        $("#btnEdit").css("visibility", "visible");
    });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜