Здравствуйте, я создаю простое расширение crossrider, которое получает данные из php и отображает их в расширении. Код работает в Chrome и FireFox, но расширение вообще не отображается в IE (v9 и v11). Ниже приведен код, который я использую:
appAPI.ready(function($) {
var sidebar = null;
$.ajax({
url:"http://localhost/getSupportLinks.php",
type: 'POST',
data: {
"currentUrl":document.URL
},
dataType:'text',
success:function(result){
$(".crossrider-sidebar-"+appAPI.appInfo.id+"-container")
.remove();
if((result+'').length >0)
{
//$(".crossrider-sidebar-"+appAPI.appInfo.id+"-container").remove();
//calculate height of toolbar base on number of icons
var sbrHgt = (((result.split("img src").length - 1)*55)+15) + 'px';
//initialize side bar
sidebar = new appAPI.sidebar({
position:'right', // Sidebar position (right, left, top, bottom) - currently only right is supported
//url: '',
html:result, // HTML for the sidebar (will be ignored if iframe URL is spesified as above)
opacity:1.0, // Sidebar's opacity
width:'120px', // Sidebar width (can be px or %)
height:sbrHgt, // Sidebar height (can be px or %)
//preloader:true, // Show spinning loader until content has loaded (apply only if url parameter is specified)
sticky:true, // If true sidebar will be sticky and ignore user scroll,
// false will make the sidebar to disapear if user scrolls down
// default:true
slide:150,
theme:'default',
openAction:['click', 'mouseover']
});
//show side
sidebar.show();
}
},
error: function(xhr, status, error) {
// var err = eval("(" + xhr.responseText + ")");
alert("Error : "+err);
// alert("Error status : "+status);
// alert("Error message on PHP call : "+error);
}
});
});
Раньше код отображался правильно, и на этой неделе расширение перестало отображаться только в IE. Я даже создал отдельный проект, который просто показывает простое предупреждение, и даже это не сработало. Я хочу знать следующее:
- Кто-нибудь еще сталкивается с этой проблемой?
- Есть ли что-то потенциально в коде, что может быть причиной этого?
Спасибо за помощь