Close

Account

Documentation

Forum

Menu

Reply To: bug in Find resume page

Post count: 67
huwcole
July 9, 2016 at 3:20 pm #21124

right i found the problem. the problem is that the plugin.js file you actually use on your demo site has the bug already removed but the one you sell hasn’t. that is a bit annoying…

issue in plugin.js

function priceslider()
{
$(“.jobplanet_price_slider”).each(function(){
var element = this;
var priceslider = $(element).find(‘.price_slider’);

var min_input = $(element).find(‘.price_slider_amount #min_price’),
max_input = $(element).find(‘.price_slider_amount #max_price’),
from = $(element).find(‘.from’),
to = $(element).find(‘.to’),
min_price = $(min_input).data(‘min’),
max_price = $(max_input).data(‘max’),
current_min_price = parseInt( min_price, 10 ),
current_max_price = parseInt( max_price, 10 );

if(current_min_price > 0 && current_max_price > 0 ) //<– THIS IS THE PROBLEM
{
$(priceslider).slider({
range: true,
animate: true,
min: min_price,
max: max_price,
values: [ current_min_price, current_max_price ],
create: function() {

$( min_input ).val( current_min_price );
$( max_input ).val( current_max_price );

$( from ).text( min_price.formatMoney(0, ‘,’, ‘.’) );
$( to ).text( max_price.formatMoney(0, ‘,’, ‘.’) );

$( document.body ).trigger( ‘price_slider_create’, [ current_min_price, current_max_price ] );
},
slide: function( event, ui ) {

$( min_input ).val( ui.values[0] );
$( max_input ).val( ui.values[1] );
$( from ).text( ui.values[0].formatMoney(0, ‘,’, ‘.’) );
$( to ).text( ui.values[1].formatMoney(0, ‘,’, ‘.’) );

$( document.body ).trigger( ‘ajax_filter_search’, [ ui.values[0], ui.values[1] ] );
},
change: function( event, ui ) {

$( document.body ).trigger( ‘ajax_filter_search’, [ ui.values[0], ui.values[1] ] );
}
});
}
});
}

I removed the if statement and everything now works.
PLEASE update the package you sell very annoying