-
-
Save Noitidart/6c172e77fe48f78521f2 to your computer and use it in GitHub Desktop.
_ff-addon-snippet-jqLike - Port jQuery functions as standalone for use in my addons
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
var jQLike = { // my stand alone jquery like functions | |
serialize: function(aSerializeObject, aEncoder=encodeURIComponent) { | |
// https://api.jquery.com/serialize/ | |
// verified this by testing | |
// http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_ajax_serialize | |
// http://www.the-art-of-web.com/javascript/escape/ | |
var serializedStrArr = []; | |
for (var cSerializeKey in aSerializeObject) { | |
serializedStrArr.push(aEncoder(cSerializeKey) + '=' + aEncoder(aSerializeObject[cSerializeKey])); | |
} | |
return serializedStrArr.join('&'); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
README
Rev1
Rev2
to_rfc3986