开发者

jquery ajaxSubmit replaceTarget javascript

开发者 https://www.devze.com 2023-04-07 17:45 出处:网络
I have a div in this pattern: <div id=\"register_container\"> ... <script type=\"text/javascript\">

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");

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号