Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ARRAY_MAP = [];
- $(".js-filter-map-inner").on("change", function () {
- var isChecked = $(this).prop("checked"),
- $self = $(this),
- value = $(this).attr("value"),
- data = $(this).data("type"),
- stars = $(this).data("type", "stars"),
- block = $(this).parent(".jq-filter-map-style");
- if (isChecked) {
- block.addClass("active"); // тут имеется ввиду класс .fmh__item.active
- if (data == "types") {
- ARRAY_MAP.push(value);
- var ill = unique(ARRAY_MAP);
- console.log(ill)
- hotelsCollection.each(function (item) {
- next:
- for (var x in item._geoObjectComponent._properties._data){
- for(var i = 0, length1 = ill.length; i < length1; i++){
- if (item._geoObjectComponent._properties._data[x] != ill[i]) {
- continue next;
- } else if (item._geoObjectComponent._properties._data[x] == ill[i] && item._geoObjectComponent._properties._data[x] == value) {
- item.options.set('visible', true);
- }
- }
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement