Show/hide search on icon click


In one of our themes we need to display the search bar when the search icon is clicked. Take a look at and the search icon in the top right. Right now the search field is set with a "display:none" property, but when the icon is clicked, this should change to "display:block".

Is there any easy way to do this? I can't find a solution!