开发者

change css inline using jquery

开发者 https://www.devze.com 2023-01-08 04:18 出处:网络
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 开发者_运维问答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

精彩评论

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