I have a div in this pattern:
<div id="register_container">
...
<script type="text/javascript">
$(document).ready(function()
alert('hi');
$("#customer").css("backgroundColor", "red");
$('#add_item_form').ajaxSubmit({target: "#register_container", replaceTarget: true});
</script>
</div>
The first run around I get a background color of red on the #customer select box and an alert. The 2nd...n times around I get an alert but开发者_JAVA百科 the #customer background doesn't change. It seems to be operating on the "Old" stuff. How can I fix this?
try
$("#customer").css("background-color", "red");
精彩评论