Skip to content

Instantly share code, notes, and snippets.

@marcmartino
Created November 22, 2013 23:47
Show Gist options
  • Save marcmartino/7608834 to your computer and use it in GitHub Desktop.
Save marcmartino/7608834 to your computer and use it in GitHub Desktop.
bleh
var nike = (function () {
var eventChain = [],
thisJqEle;
return {
findElement: function (elementSelector, asyncTimeout) {
//async should be the lenght of time to wait when looking async for the ele
//sync only now
eventChain.push(function (elementSelector, asyncTimeout) {
return function () {
var foundEle;
if (asyncTimeout) {
} else {
foundEle = $(elementSelector);
if (foundEle.length > 0) {
thisJqEle = foundEle;
console.log("found element: " + elementSelector);
} else {
console.error("no element found: " + elementSelector);
}
thisNike.next();
}
};
}(elementSelector, asyncTimeout));
return this;
},
click: function () {
},
submitForm: function () {
},
wait: function () {
},
next: function () {
//
}
};
} ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment