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");
});
});
精彩评论