Last active
August 29, 2015 14:12
-
-
Save crongro/eac69ce28228987204b2 to your computer and use it in GitHub Desktop.
initiate variables
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 setVariables(obj) { | |
var o = {}; | |
for(var myKey in obj) { | |
o[myKey] = document.querySelector(obj[myKey]); | |
} | |
return o; | |
} | |
var _v = setVariables({ | |
"ele" : '#ajax-error-message', | |
"ele2" : '.wrapper', | |
"ele3" : '.site-footer' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment