Created
September 28, 2016 18:56
-
-
Save jdcauley/155cd1fccc6803385d68a536c504d406 to your computer and use it in GitHub Desktop.
what the crap
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
driverInputs.each(function(i){ | |
var data = $(this).getParams(); | |
app.data.drivers.push(data); | |
if(!app.saved['drivers']){ | |
app.saved['drivers'] = []; | |
} | |
var newCopy = app.model.driver.slice(0); | |
console.log(newCopy); | |
$.each(newCopy, function(index, item){ | |
$.each(data, function(key, value){ | |
if(item.fieldName === key){ | |
item.value = value; | |
} | |
}); | |
}); | |
app.saved['drivers'].push(newCopy); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment