Created
July 16, 2014 13:43
-
-
Save rodneyrehm/f8a613f137799fb0a18b to your computer and use it in GitHub Desktop.
URI.js jQuery plugin: make $.ajax() accept URI instances
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
$.ajax = (function(ajax) { | |
return function(url) { | |
if (url instanceof URI) { | |
arguments[0] = arguments[0].toString(); | |
} | |
return ajax.apply($, arguments); | |
}; | |
})($.ajax); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment