我的问题只在IE中显示,只有当我第一次连接时,当我刷新页面时才会显示图像! 我的页面是使用顶部的jQuery脚本构建的,之后是html。
<div id="statusbar" >
<img class="statusbar_phone" />
<img class="statusbar_text" />
<img class="arrow" style="display:none" src="//expertsimages.liveperson.com/images/phonewidget/arrow_up.png" />
</div>
前两张图片应该从服务中获得正确的图像。
function InitExpertStatus() {
service.GetExpertStatus(function (data) {
$('.arrow').show();
switch (data) {
case "online":
{
SetStatusAvailable(true);
InitPhonNumbers();
break;
}
case "offline":
{
SetStatusAvailable(false);
InitPhonNumbers(data);
break;
}
case "busy":
{
$('.phone_status').text("You are busy.");
$('.set_numbers').text("You can only switch phone numbers when you're not busy. Please try after your chat or phone session is over.");
$('.set_numbers').css('color', '#FF7E00');
$(".statusbar_phone").attr("src", "//expertsimages.liveperson.com/images/phonewidget/phone_red.png");
$(".statusbar_text").attr("src", "//expertsimages.liveperson.com/images/phonewidget/txt_busy.png");
$("#phoneIDMessage").hide();
HideNumbers();
break;
}
case "blocked":
{
HideNumbers();
$('.set_numbers').hide();
$('#editNumbersLink').hide();
$('#contactUs').show();
$('.phone_status').text("Your account has been blocked.");
$('.phone_status').css('color', '#FF0000');
SetStatusAvailable(false);
break;
}
default:
}
});
}
function SetStatusAvailable(isAvailables) {
if (isAvailables) {
$(".statusbar_phone").attr("src", "//expertsimages.liveperson.com/images/phonewidget/phone_blue.png");
$(".statusbar_text").attr("src", "//expertsimages.liveperson.com/images/phonewidget/txt_available.png");
$("#phoneIDMessage").show();
}
else {
$(".statusbar_phone").attr("src", "//expertsimages.liveperson.com/images/phonewidget/phone_red.png");
$(".statusbar_text").attr("src", "//expertsimages.liveperson.com/images/phonewidget/txt_notavailable.png");
$("#phoneIDMessage").hide();
}
$('#contactUs').hide();
}
任何建议:)