How to add `style=display:"block"` to an element using jQuery?

Someone picture Someone · Jul 16, 2010 · Viewed 566.3k times · Source

How to add style=display:"block" to an element in jQuery?

Answer

Colin Brock picture Colin Brock · Jul 16, 2010
$("#YourElementID").css("display","block");

Edit: or as dave thieben points out in his comment below, you can do this as well:

$("#YourElementID").css({ display: "block" });