I want to set the dropdown to the value found in sortby in the URL. I'm not sure how to get the querystring from the URL using Jquery, doesn't jquery have something built in?
URL: http://www.test.com/search.php?h=454&sortBy=books&nan=4812
<select class="SearchSortingList">
<option value="tires">5tires and stuff</option>
<option value="cars">5cars and stuff</option>
<option value="books">5books and stuff</option>
<option value="kites">5kites and stuff</option>
</select>
This is where I'm at, I just need a bit of help please.
// select books dropdown since the value of sortby (in url) is books
$('select[name="SearchSortingList"]').val(JQUERY_GRABQUERYSTRINGVALUE('sortBy'));