我的问题仅在 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();
}
有什么建议么 :)