<table class="translate">
<tbody><tr>
<td colspan="2">Translations</td>
<td>Price</td>
<td></td>
</tr>
<tr class="form1">
<td><span id="trans-number-1" class="col">1</span></td>
<td></td>
<td><span class="currenty">$</span><span id="trans-price-1" class="price">$247</span><span class="vert">/</span><span class="price-one">$</span><span class="text">per optimization</span></td>
<td><button class="btn btn-buy" data-value="1">buy now</button></td>
</tr>
<tr class="form4">
<td><span id="trans-number-4" class="col">4</span></td>
<td></td>
<td><span class="currenty">$</span><span id="trans-price-4" class="price">908</span><span class="vert">/</span><span class="price-one">$</span><span class="text">per optimization</span></td>
<td><button class="btn btn-buy" data-value="4">buy now</button></td>
</tr>
<tr class="form12">
<td><span id="trans-number-12" class="col">12</span></td>
<td></td>
<td><span class="currenty">$</span><span id="trans-price-12" class="price">2364</span><span class="vert">/</span><span class="price-one">$</span><span class="text">per optimization</span></td>
<td><button class="btn btn-buy" data-value="12">buy now</button></td>
</tr>
</tbody></table>
function checkCookiejTour(){
var cookie=getCookie("jTourExampleCookie");
if (cookie==null || cookie=="") {
setCookie("jTourExampleCookie", "1",90);
jTour().start();
}
}
<input class="textfield filter__search js-shuffle-search" type="search" id="filters-search-input" />
// Advanced filtering
Demo.prototype.addSearchFilter = function() {
var searchInput = document.querySelector('.js-shuffle-search');
if (!searchInput) {
return;
}
searchInput.addEventListener('keyup', this._handleSearchKeyup.bind(this));
};
/**
* Filter the shuffle instance by items with a title that matches the search input.
* @param {Event} evt Event object.
*/
Demo.prototype._handleSearchKeyup = function(evt) {
var searchText = evt.target.value.toLowerCase();
this.shuffle.filter(function(element, shuffle) {
// If there is a current filter applied, ignore elements that don't match it.
if (shuffle.group !== Shuffle.ALL_ITEMS) {
// Get the item's groups.
var groups = JSON.parse(element.getAttribute('data-groups'));
var isElementInCurrentGroup = groups.indexOf(shuffle.group) !== -1;
// Only search elements in the current group
if (!isElementInCurrentGroup) {
return false;
}
}
var titleElement = element.querySelector('.title');
var titleText = titleElement.textContent.toLowerCase().trim();
return titleText.indexOf(searchText) !== -1;
});
};