1

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

1
  • 1
    Your CSS is invalid, lengths require a unit unless they are 0. Commented Jul 16, 2010 at 20:55

2 Answers 2

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

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

Sign up to request clarification or add additional context in comments.

1 Comment

Can we do this : $('.emrBTN').css('visibility', 'visible'); And how to change multiple css attributes say css('visibility', 'visible') and css('position', 'relative') simultaneously ??
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");
    });
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.