我想更改页脚右侧聊天框 div 的打开和关闭时的箭头图像。
这是我的代码
<div class="chat_olark">
<div id="top_chat" style="cursor:pointer">
<div id="chat_heading"><a href="#">Contact Us!</a></div>
<div id="chat_arw"><a href="javascript:toggle()"><img src="images/chat_arw_up.png"></a></div>
</div>
<div id="body_chat" style="display:none;">
<div id="chat_txt">We're not around, but we'd love to chat another time.</div>
<form name="cat" action="contact.php" method="post" onsubmit="return valid();">
<textarea value="click here and type your name..." style="resize: none; height: 15px; margin-left: 5px; width: 235px;" cols="50" rows="20" name="contactname" placeholder="Name" id="name"></textarea>
<textarea value="click here and type your name..." style="resize: none; height: 15px; margin-left: 5px; margin-top:5px; width: 235px;" cols="50" rows="20" name="email" placeholder="Your Email" id="email"></textarea>
<textarea value="click here and type your name..." style="resize: none; height: 30px; margin-left: 5px; margin-top:5px; width: 235px;" cols="50" rows="20" name="subject" placeholder="Subject Here!" id="subject"></textarea>
<textarea value="click here and type your name..." style="resize: none; height: 70px; margin-left: 5px; margin-top:5px; width: 235px;" cols="50" rows="20" name="message" placeholder="Your Message Here!" id="msg"></textarea>
<input type="submit" name="submit" value="Send" class="proceed_btn505" style="float:right;margin: 10px 7px 0 0;cursor:pointer">
</form>
</div>
</div>
查询:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#body_chat").hide();
$("#top_chat").show();
$('#top_chat').click(function(){
$("#body_chat").slideToggle();
});
});
</script>
当显示 body_chat 时,应该更改图像箭头。我的第二个图像名称是 arr_down.png。请帮我