I'm working with a "new item" form for a SharePoint survey.
In Chrome, the following code shows an alertbox and then makes every other row darker.
In IE 11, the following code shows an alertbox but doesn't change the appearance.
Why?
<style type="text/css">
.oddrow { background : #eee9e9 !important;}
</style>
<script src="../../SiteAssets/jquery.min.js"></script>
<script type=text/javascript>
function addOddRowStripe() {
alert("Hello World");
// Why doesn't IE like the next line?
jQuery("td.ms-formbodysurvey table tbody tr:odd").addClass("oddrow");
};
_spBodyOnLoadFunctionNames.push("addOddRowStripe");
</script>