在外部页面中使用select选项抓取并显示jQuery同位素的过滤值

时间:2015-11-18 09:18:10

标签: javascript php jquery jquery-isotope

我有2页 - apple.php&红apples.php

apples.php

HTML

<select class="filters-select">
    <option value=".a1">a1</option>
    <option value=".a2">a2</option>
</select>
<div class="isotope">//values to be filtered here, with itemSelector class each</div>

JS

// bind filter on select change
$('.filters-select').on('change', function () {
    // get filter value from option value
    var filterValue = this.value;
    // use filterFn if matches value
    filterValue = filterFns[filterValue] || filterValue;
    $container.isotope({
        filter: filterValue
    });
});

现在我想要red-apples.php,在加载时加载/打开/回显,用div说

红apples.php

<div id="grab-filtered-data">

// filtered-data-of isotope from apples.php, when a1 is selected

</div>

任何线索?

0 个答案:

没有答案