Tutorial :change css inline using jquery



Question:

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


Solution:1

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

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


Solution:2

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");      });  });  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »