I have a URL which have some default model,
example.com/selector/
when user type something it update the list
<input type="text" name="filter" placeholder="{{$lang.common_forms.field_filter_hint}}"/>
example.com/selector/?q=something
<div id="unik" class="button-group">
{{foreach item="item" from=$data}}
<div class="item">
<input id="model_{{$item.model_id}}" type="checkbox" class="checkbox" value="{{$item.model_id}}"/>
<label for="model_{{$item.model_id}}">{{$item.title}}</label>
</div>
{{/foreach}}
</div>
I want to update it, when user start typing input text box:
<div class="filter">
<input type="text" name="filter" placeholder="{{$lang.common_forms.field_filter_hint}}"/>
</div>
Via ajax or javascript
var params = parsedUrl.param();
delete params["page"];
var newUrl = "?page=" + $(this).val() + "&" + $.param(params);