Last active
October 27, 2015 14:43
-
-
Save xto3na/32b5b1bac1876464b21d to your computer and use it in GitHub Desktop.
Edit location
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
$('#button-filter').on('click', function(bf) { | |
var stepCount = 2; | |
var currentUrl = window.location; | |
var firstAddr = currentUrl.pathname.toString().match(/^\/[a-z]*\/?/); | |
window.location = location.protocol + "//" + location.hostname + firstAddr[0] + location.search; | |
//window.history.go( - stepCount); | |
bf.stopImmediatePropagation(); | |
}); | |
//OR | |
$('#button-filter').on('click', function(bf) { | |
var currentUrl = window.location; | |
var firstAddr = currentUrl.pathname.toString().match(/^\/[a-z\-]*\/?/); | |
// var newSearch = currentUrl.search.toString().match(/\?route\=[a-z]*\/[a-z\-]*\&path\=[0-9\_]*/); | |
window.location = location.protocol + "//" + location.hostname + firstAddr[0];// + location.search;//newSearch[0]; | |
//window.history.go( - lenItems); | |
bf.stopImmediatePropagation(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment