$(document).ready(function () {
    var $range = $('.js-search-criteria-range');
    var $multi = $('.js-search-criteria-multi');
    var $must = $('.js-search-criteria-must');
    var $all = $multi.add($must);
    var $search = $('.js-search-criteria-fulltext');
    var $hint = $('#js-count-hint');
    var $loader = $('.js-count-loader', $hint);
    var $count = $('.js-count-result', $hint);
    var $empty = $('.js-empty', $hint);
    var $submit = $('.js-submit', $hint);
    var $container = $('.js-container');

    function getCriteria() {
        var criteria = [];

        $all.each(function () {
            var $this = $(this);
            var list = [];
            $('input:checked', $this).each(function () {
                list.push($(this).attr('data-alias'));
            });
            if (list.length) {
                criteria.push($this.attr('data-param') + '=' + list.join());
            }
        });

        $range.each(function () {
            var $this = $(this);

            criteria.push($this.attr('data-param') + '=' + $('.js-range-from', $this).val() + '-' + $('.js-range-to', $this).val());
        });

        criteria.push('search' + '=' + $search.val());

        return '?' + criteria.join('&');
    }

    function search() {
        window.location.href = '/developers' + getCriteria();
    }

    function setCountOffset(top) {
        $hint.css('top', top);
    }

    function showCount(props) {
        $hint.toggleClass('shown', props.shown);
        $loader.toggleClass('loader', props.loaded);
        $count.html(props.count);
        $empty.toggle(props.empty);
        $submit.toggle(props.submit);
    }
    
    function showConcreteCountMap($map, map) {
        var param = $map.attr('data-param');
        $('input', $map).each(function () {
            var $input = $(this);
            var alias = $input.attr('data-alias');
            var count = map[param][alias] || 0;
            $input.next('label').find('span.badge').html(count);
        });
    }

    function showCountMap(response) {
        showConcreteCountMap($multi, response.multi);
        showConcreteCountMap($must, response.must);
    }

    function getCount() {
        showCount({
            shown: true,
            loaded: true,
            submit: true,
            empty: false,
            count: ''
        });
        $.ajax({
            url: '/api/v1/developers/count.json' + getCriteria(),
            success: function (response) {
                showCount({
                    shown: true,
                    loaded: false,
                    submit: response.count > 0,
                    empty: response.count === 0,
                    count: response.count
                });
                showCountMap(response);
            }
        });
    }

    $(document).on('click', '.js-search-submit', search);
    $submit.on('click', search);
    $('input', $all).on('change', function () {
        setCountOffset($(this).offset().top - $container.offset().top);
        getCount();
    });
    $hint.on('click', '.js-close', function () {
        showCount({
            shown: false,
            loaded: false,
            submit: true,
            empty: false,
            count: '',
        });
    });
    $search.add($range).on('keyup', function (event) {
        if (event.keyCode === 0b1101) {
            search();
        }
    });
});
@@ -2024,28 +2024,30 @@
    function 
-show
+update
 CountMap(res
@@ -2160,32 +2160,476 @@
 e.must);%0A    %7D%0A%0A
+    function updateRange(response) %7B%0A        $range.each(function () %7B%0A            var $this = $(this);%0A            var param = $this.attr('data-param');%0A%0A            if (response.range.hasOwnProperty(param)) %7B%0A                var range = response.range%5Bparam%5D;%0A%0A                $('.js-range-from', $this).attr('placeholder', range.from);%0A                $('.js-range-to', $this).attr('placeholder', range.to);%0A            %7D%0A        %7D);%0A    %7D%0A%0A
     function get
@@ -3188,28 +3188,30 @@
             
-show
+update
 CountMap(res
@@ -3218,16 +3218,55 @@
 ponse);%0A
+                updateRange(response);%0A
         

Update experience & salary range from API Count map #63