Created
June 7, 2012 22:40
-
-
Save marcmartino/2892141 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 attachEvent(el, action, callback){ | |
if (el.addEventListener) { | |
el.addEventListener(action, callback, false); | |
} else if (el.attachEvent) { | |
el.attachEvent('on' + action, (function (ele) { return callback; })(el) ); | |
} | |
} | |
inputKeyup: function (courseType){//event that's triggered on the input keyups | |
var currentRequest; | |
return function (e){ | |
var currentThis = this; | |
if (this == window){ currentThis = ele; } | |
console.log("keyup"); | |
console.log(currentThis); | |
var val = currentThis.value, | |
cachedValues = cachedServerResponses[currentThis.getAttribute("data-course-type")][val]; | |
} | |
} | |
attachEvent(allInputs[m], "keyup", inputKeyup(thisAttr)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment