Last active
June 24, 2020 17:36
-
-
Save eapdob/ea3af86d3e9b4e768c954d97b26ddf3a to your computer and use it in GitHub Desktop.
js relocate to category id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
let _window = $(window); | |
_window.on("resize", function() { | |
if (window.innerWidth <= 992) { | |
if (window.location.pathname = '/') { | |
let categoryId = '123'; | |
window.location.href = '/index.php?route=product/category&category_id=' + categoryId; | |
} | |
} | |
}); | |
_window.trigger("resize"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment