Have been really struggling with this, I would appreciate any help or nudge in the right direction...
I have a dropdown bar with select that pulls results on a page with ajax... only trouble is that it duplicates the results being pulled in. However, this can be fixed if the page has a HARD refresh after the results are loaded, which is what I would like to emulate with jquery...
Basically, I would like it so that any time "selected" is loaded by a user, it then loads the results of the page and hard refreshes the window after a second or so.
This is the code I am trying to use but it's not working:
Edited attempt -
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.filter').change(function(){
setTimeout(function(){
location.reload(true);
},5000); // here 5000 is the delay of 5s
});
});
</script>
Can any kind soul please steer me in the right direction?
The html of the select tag's dropdown looks like this:
<select class="filter">
<option value="#">-- All --</option>
<option id="select-denver" value="denver"
selected="selected">Denver</option>
<option id="select-laramie-wyoming" value="laramie-wyoming">Laramie,
Wyoming</option>
</select>
Thank you so much for any help.