This is the code that works locally and not when the webapp is depployed on the .meteor server:
(I’m using alethes:pages package for pagination)
In the template: (I deleted here the left brackets in order to show it)
div class=“price-range”>
h2>Max Price
li class=“single_field”>
select>
option class=“val0”>25€
option class=“val1”>50€
/select>
/li>
/div>
In the helper:
…
‘click .val0’: function(event){
event.preventDefault();
filterByPrice(25);
},
‘click .val1’: function(event){
event.preventDefault();
filterByPrice(50);
},
function filterByPrice(limit) {
Tracker.autorun(Pages.set( {
filters:
{
price : {$lt : limit}
}
}));
return;
}
I have other similar events/functions that work well also on the meteor server, like one triggered this way:
h4 class=“panel-title all”>a href="#">All
Suggestions?