Html
:
<a class="link smart-select smart-select--custom smart-select-init">
<select name="price-low-high-1" id="local_sort_price">
<option value="low" selected>sort by decrease</option>
<option value="high">sort by increase</option>
</select>
<div class="item-content">
<table>
<tr>
<td>
<div class="item-inner">
<div class="item-title">Price:</div>
</div>
</td>
<td class="right">
<img class="dropdown-ic" src="~/Resources/img/ic_dropdown.svg" alt="">
</td>
</tr>
</table>
</div>
</a>
routes init:
smartSelect: {
el: ".smart-select--custom",
openIn: "sheet",
sheetCloseLinkText: "Close",
renderItem: function (item, index) {
return '<li><label class="item-radio item-check-location item-content ' + item.value + '">' +
'<input type="radio" name="' + item.inputName + '" value="' + item.value + '" ' + (item.selected ? 'checked' : '') + '>' +
'<div class="item-inner item-inner-custom">' +
'<div class="item-title">' + item.text + '</div>' +
'</div>' +
'<div class="item-radio__checked">' +
'<span></span>' +
'</div>' +
'</label></li>';
},
closeOnSelect: true,
}
I cann’t get value after select, I tried to use
var smartSelect = app.smartSelect.get('.smart-select--custom').selectEl;
but it still not work. . . So how can I get value in that select option
to sort information by decrease
or increase
price?
This is the client: