Created
September 25, 2013 13:09
-
-
Save mishak87/6699344 to your computer and use it in GitHub Desktop.
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
ko.extenders.url = function (target, option) { | |
var value = $.address.parameter(option); | |
if (value) { | |
target(value); | |
} | |
target.subscribe(function (value) { | |
$.address.parameter(option, value); | |
}); | |
$.address.change(function (event) { | |
target(event.parameters[option]); | |
}); | |
return target; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment