Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jPriceSliderEl.unbind().on("change", function(slideEvt) {
- if ((slideEvt.value === null) || (typeof slideEvt.value === "undefined") || (slideEvt.value == "")) {
- $(slideEvt.target).closest('.widget__block').find('.min-limit').text(price_min_set);
- $(slideEvt.target).closest('.widget__block').find('.max-limit').text(price_max_set);
- }
- });
- jPriceSliderEl.unbind().on("slideStop", function(slideEvt) {
- {
- var Country = $('input[name=Country]').val();
- var date = $('input[name=date]').val();
- if ((Country === null) || (typeof Country === "undefined") || (Country == "")) {
- Country = getParameterByName('SearchText');
- if ((Country === null) || (typeof Country === "undefined") || (Country == "")) {
- Country = '';
- }
- }
- if ((date === null) || (typeof date === "undefined") || (date == "")) {
- date = getParameterByName('date');
- if ((date === null) || (typeof date === "undefined") || (date == "")) {
- date = '';
- }
- }
- if ((Country == '') || (date == '')) {
- return false;
- }
- var date_url = getParameterByName('date');
- var Country_url = getParameterByName('SearchText');
- $(slideEvt.target).closest('.widget__block').find('.min-limit').text(slideEvt.value.newValue[0]);
- $(slideEvt.target).closest('.widget__block').find('.max-limit').text(slideEvt.value.newValue[1]);
- $scope.minPrice = slideEvt.value.newValue[0];
- $('#price-min').val($scope.minPrice);
- $scope.maxPrice = slideEvt.value.newValue[1];
- $('#price-max').val($scope.maxPrice);
- var url = window.location.href;
- url = updateQueryStringParameter(url, 'price_min', $scope.minPrice);
- url = updateQueryStringParameter(url, 'price_max', $scope.maxPrice);
- if ((date_url === null) || (typeof date_url === "undefined") || (date_url == "")) {
- url = updateQueryStringParameter(url, 'date', date);
- }
- if ((Country_url === null) || (typeof Country_url === "undefined") || (Country_url == "")) {
- url = updateQueryStringParameter(url, 'SearchText', Country);
- }
- window.location.href = url;
- }
- });
Add Comment
Please, Sign In to add comment