こんにちは私は以下のjqueryスクリプトをInternet Explorerで動作させるのに問題があります。より多くのボタンが反応しません。私は小さな構文エラーなどを見つけることができません。私はそれがIE上で動作するように誰かが私がスクリプトを変更するのを助けることができるでしょうか。互換モードでIEを実行すると動作します。ありがとう。jqueryはFF、クロム、サファリでは動作しますがIEでは動作しません
$(document).ready(function() {
var pid = $("div#productcontainerbottom").attr("class");
var initialtotalcomments = $(".loadmore").attr("id"); //total comments before any inserts or deletes
initialtotalcomments = parseInt(initialtotalcomments);
if (initialtotalcomments <= 10) {
$(".loadmore").hide();
}
if (initialtotalcomments >= 11) {
$(".loadmore").show();
$("#commentview").html(10 + " of ");
$("#commentcount").html(initialtotalcomments);
}
$(".loadmore").click(function(e) {
e.preventDefault();
$.post("ajax/commentcount.php?id=" + pid, function(actualtotalcount) {
var commentviewcountbeforeclick = $('.date').length; //number of comments displayed on page before more click. varies due to inserts or deletes before click of more button. each insert increases it by 1. each delete decreases it by 1.
actualtotalcount = parseInt(actualtotalcount);
//keeps track of actual total comment count adjusted for inserts and deletes
var end = commentviewcountbeforeclick + 10;
$(".loading").show();
$.post("ajax/pull.php?id=" + pid, {
end: end
}, function(data) {
$("#commentarea").html(data);
$('.confirmdelete').hide();
$(".loading").hide("slow");
var commentviewafterclick = $('.date').length; //number of comments displayed on page after click(= to commentviewbeforeclick + num)
if (actualtotalcount >= 11) {
$("#commentview").html(commentviewafterclick + " of ");
$("#commentcount").html(actualtotalcount);
}
if (commentviewafterclick == actualtotalcount) {
$(".loadmore").hide();
}
});
});
});
});
_以下のjqueryスクリプトをインターネットエクスプローラで動作させるのに問題があります_ **大したことはありません!** – gdoron
moreボタンが反応しません – Anonymous
JavaScriptコンソールにエラーが表示されますか? – JJJ