I have a blog site and recently added a search bar for visitors to browse through blog posts. When used, all of the posts go away in the directory and only those which return via the search appear. In order to show the general directory and view all, I would like to have a link appear after the search bar is used to allow this.
I know this could be done with jQuery .click and .show; however, I figured it would be easier if I placed in an IF statement. Similar to how I use if user_signed_in? to show links, I was wondering what the method would be for when the search box is used?
Thank you!
Joe
Aucun commentaire:
Enregistrer un commentaire