Title: Search button javascript hack
Last modified: August 22, 2016

---

# Search button javascript hack

 *  [Begin](https://wordpress.org/support/users/bentalgad/)
 * (@bentalgad)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/search-button-javascript-hack/)
 * I have a plug-in called [“Essential Grid”](http://codecanyon.net/item/essential-grid-wordpress-plugin/7563340)
   which does great portfolio style grids.
 * **Now i have this code in my header.php that does a “ajax Live search style” 
   in this portfolio grid:**
    `<div class="esg-filter-wrapper eg-search-wrapper 
   esg-fgc-1" style="margin-left: 2.5px; margin-right: 2.5px;"><input name="eg-search-
   input-1" class="eg-search-input" type="text" value="" placeholder="search"><div
   id="searchButtons"><span class="eg-search-submit"><i class="eg-icon-search"></
   i></span><span class="eg-search-clean"><i class="eg-icon-cancel"></i></span></
   div></div>`
 * _**It works great!**_
 * **What I want to do is:**
    Stay with this search in the header for all the pages,
   but make the search submit button return the browser to the homepage (that has
   the portfolio which this search is for) and then do the search… (but still stay
   with the same regular function on the homepage, maybe with a check if is_home
   or so…)
 * _Is it some how understood?_
 * Really will appreciate some help with that.
 * Thanks,
    Ben

The topic ‘Search button javascript hack’ is closed to new replies.

## Tags

 * [grid](https://wordpress.org/support/topic-tag/grid/)
 * [is_home](https://wordpress.org/support/topic-tag/is_home/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [submit](https://wordpress.org/support/topic-tag/submit/)

 * 0 replies
 * 1 participant
 * Last reply from: [Begin](https://wordpress.org/support/users/bentalgad/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/search-button-javascript-hack/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
