I have written the below code for pagination. This is working fine in FF but failing in IE :(. Can anyone of you pls let me know where I have gone wrong? Is it the $ symbol? I coulb not trace out. Can someone pls help me in finding the solution.
jQuery.noConflict();
jQuery(document).ready(function($){
$(".content .outageinfo").hide();
$("#alertupdate div").hide();
$(".content .outageinfo").slice(0, 3).show();
$("#alertupdate div").slice(0, 3).show();
$("#prev").addClass("disabled");
if($(".content .outageinfo").length < 4){
$("#next").addClass("disabled");
}
$("#next").click(function () {
$("#prev").removeClass("disabled");
var items = $('.content .outageinfo:visible').hide().last();
var radItems = $("#alertupdate .outageradio:visible").hide().last();
var nextItems = items.nextAll().slice(0, 3);
var nextRadItems = radItems.nextAll().slice(0, 3);
if (nextItems.last().nextAll().length <= 3) {
console.log(nextItems.length);
$("#next").addClass("disabled");
$("#prev").removeClass("disabled");
}
nextItems.show();
nextRadItems.show();
});
$("#prev").click(function () {
$("#next").removeClass("disabled");
var items = $('.content .outageinfo:visible').hide().first();
var radItems = $("#alertupdate .outageradio:visible").hide().first();
var prevItems = items.prevAll().slice(0, 3);
var prevRadItems = radItems.prevAll(".outageradio").slice(0, 3);
// console.log(prevRadItems);
// console.log(prevItems.first());
// console.log(prevItems.first().prevAll());
// console.log(prevItems.first().prevAll().length)
if (prevItems.last().prevAll().length == 0 ) {
$("#next").removeClass("disabled");
$("#prev").addClass("disabled");
}
prevItems.show();
prevRadItems.show();
});
});