MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.17.181.199
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home1/a1673wkz/propstonerealty.com/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home1/a1673wkz/propstonerealty.com/js/range.js
/*----------------------------------
    //------ ADVANCED SEARCH ------//
    -----------------------------------*/
    $('.more-search-options-trigger').on('click', function (e) {
        e.preventDefault();
        $('.more-search-options, .more-search-options-trigger').toggleClass('active');
        $('.more-search-options.relative').animate({
            height: 'toggle',
            opacity: 'toggle'
        }, 300);
    });

/*----------------------------------------------------*/
/*  Range Sliders
/*----------------------------------------------------*/

// Area Range
$("#area-range").each(function () {

    var dataMin = $(this).attr('data-min');
    var dataMax = $(this).attr('data-max');
    var dataUnit = $(this).attr('data-unit');

    $(this).append("<input type='text' class='first-slider-value'disabled/><input type='text' class='second-slider-value' disabled/>");

    $(this).slider({

        range: true,
        min: dataMin,
        max: dataMax,
        step: 10,
        values: [dataMin, dataMax],

        slide: function (event, ui) {
            event = event;
            $(this).children(".first-slider-value").val(ui.values[0] + " " + dataUnit);
            $(this).children(".second-slider-value").val(ui.values[1] + " " + dataUnit);
        }
    });
    $(this).children(".first-slider-value").val($(this).slider("values", 0) + " " + dataUnit);
    $(this).children(".second-slider-value").val($(this).slider("values", 1) + " " + dataUnit);

});


// Price Range
$("#price-range").each(function () {

    var dataMin = $(this).attr('data-min');
    var dataMax = $(this).attr('data-max');
    var dataUnit = $(this).attr('data-unit');

    $(this).append("<input type='text' class='first-slider-value' disabled/><input type='text' class='second-slider-value' disabled/>");


    $(this).slider({

        range: true,
        min: dataMin,
        max: dataMax,
        values: [dataMin, dataMax],

        slide: function (event, ui) {
            event = event;
            $(this).children(".first-slider-value").val(dataUnit + ui.values[0].toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
            $(this).children(".second-slider-value").val(dataUnit + ui.values[1].toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
        }
    });
    $(this).children(".first-slider-value").val(dataUnit + $(this).slider("values", 0).toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
    $(this).children(".second-slider-value").val(dataUnit + $(this).slider("values", 1).toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));


});

/*----------------------------------------------------*/
/*  Range Sliders 2
/*----------------------------------------------------*/

// Area Range
$("#area-range-rent").each(function () {

    var dataMin = $(this).attr('data-min');
    var dataMax = $(this).attr('data-max');
    var dataUnit = $(this).attr('data-unit');

    $(this).append("<input type='text' class='first-slider-value'disabled/><input type='text' class='second-slider-value' disabled/>");

    $(this).slider({

        range: true,
        min: dataMin,
        max: dataMax,
        step: 10,
        values: [dataMin, dataMax],

        slide: function (event, ui) {
            event = event;
            $(this).children(".first-slider-value").val(ui.values[0] + " " + dataUnit);
            $(this).children(".second-slider-value").val(ui.values[1] + " " + dataUnit);
        }
    });
    $(this).children(".first-slider-value").val($(this).slider("values", 0) + " " + dataUnit);
    $(this).children(".second-slider-value").val($(this).slider("values", 1) + " " + dataUnit);

});


// Price Range
$("#price-range-rent").each(function () {

    var dataMin = $(this).attr('data-min');
    var dataMax = $(this).attr('data-max');
    var dataUnit = $(this).attr('data-unit');

    $(this).append("<input type='text' class='first-slider-value' disabled/><input type='text' class='second-slider-value' disabled/>");


    $(this).slider({

        range: true,
        min: dataMin,
        max: dataMax,
        values: [dataMin, dataMax],

        slide: function (event, ui) {
            event = event;
            $(this).children(".first-slider-value").val(dataUnit + ui.values[0].toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
            $(this).children(".second-slider-value").val(dataUnit + ui.values[1].toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
        }
    });
    $(this).children(".first-slider-value").val(dataUnit + $(this).slider("values", 0).toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
    $(this).children(".second-slider-value").val(dataUnit + $(this).slider("values", 1).toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));


});

MMCT - 2023