I have a web service that updates a databound row, on success I want the row to highlight green then change back to its original color but I am having the most difficulty accomplishing the easiest part (the animate). Here is my javascript code, it works up until the animate part:
<script type="text/javascript">
function lbUpdateCriteria_Click(srcEl) {
var vId = srcEl.getAttribute("CriteriaVestingId");
var currentTr = $(srcEl).closest("tr");
var typeId = currentTr.find("[getValue=ddlVestingCriteriaType" + vId + "]").val();
var lowerBound = currentTr.find("[getValue=tbLowerBound" + vId + "]").val();
var upperBound = currentTr.find("[getValue=tbUpperBound" + vId + "]").val();
UpdateVestingCriteria(vId, typeId, lowerBound, upperBound, currentTr);
}
function UpdateVestingCriteria(vId, typeId, lowerBound, upperBound, currentTr) {
var webMethod = "../Service/UpdateCriteria.asmx/UpdateNewCriteria";
var parameters = "{'criteriaVestingId':'" + vId + "','criteriaTypeId':'" + typeId + "','lowerBound':'" + lowerBound + "','upperBound':'" + upperBound + "'}";
$.ajax({
type: "POST",
url: webMethod,
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
currentTr.animate({ backgroundColor: "#48B84B" }, 1000);
},
error: function (e) {
debugger;
alert(e.statusText)
}
});
}
</script>
When it gets to the line currentTr.animate({...}) it throws this error
Microsoft JScript runtime error: Object doesn't support this property or method
I've checked my jqueryui is the latest version 1.8.22, I've also tried other jqueryUI functions like css that do work correctly on the row. I don't know what else could be the problem. I've tried googling the error and nothing relavent to me comes up. Any help or suggestions would be greatly appreciated.