I have two separate forms on the index.php page:
<form action="search_results.php" method="get" id="search_housing_area">
<input type="text" name="rent_housing" />
<inout type="submit" name="search_housing" value="" />
</form>
<form action="search_results.php" method="get" id="search_rooms_area">
<input type="text" name="rent_rooms" />
<inout type="submit" name="search_rooms" value="" />
</form>
When I submit either of those forms the url appears as:
http://www.domain.com/search_results.php?rent_housing=1234&search_housing=
OR
http://www.domain.com/search_results.php?rent_rooms=1234&search_rooms=
On the search_results.php page, I have two divs, #housing_results and #rooms_results. They are both hidden by default. If the GET variable 'search_housing' exists, I would like to show div#housing_results and if the the GET variable 'search_rooms' exists, I would like to show div#rooms_results.
How can I make a specific div show using jQuery if a specific GET variable exists in the url?