document has no load event, notice nothing happens:
$(document).load(function() {
console.log("Ran");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
You may have meant $(window).load(function(){ ... }):
$(window).load(function() {
console.log("Ran");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
...but beware that that event happens very late in the page load cycle, after all resources (including all images) have been loaded.
To run your code when the DOM is complete but before the load event, just put your code in a script tag at the end of the document, just before the closing </body> tag (or use jQuery's $(function() { }) "DOM ready" feature, though there's no real need for it).
A couple of other notes:
bind is obsolete and deprecated. With modern jQuery (and hopefully you're using a modern version), use on.
matchMedia returns an object with events for when the result of the rule changes, so there's no need to use resize.
matchMedia allows "and", no need for two separate checks.
Instead, for just a reactive check:
<script>
matchMedia("(max-width: 767px) and (max-width: 1259px)").addListener(function(e) {
if (e.matches) {
// Your .filter--facet-container logic here
}
});
</body>
</html>
or for an initial proactive check and then reactive checks afterward (probably what you want):
<script>
(function() { // Avoid creating globals
var matcher = matchMedia("(max-width: 767px) and (max-width: 1259px)");
function facetContainerLogic() {
// Your .filter--facet-container logic here
}
// Proactive initial check
if (matcher.matches) {
facetContainerLogic();
}
// Get notifications when it changes
matcher.addListener(function(e) {
if (e.matches) {
facetContainerLogic();
}
});
})();
</body>
</html>