I have two pages with different initial ways, pageA is ajax, the other pageB is document.ready
The document.ready ways works well, and the ajax ways have two problems:
1、there is nothing happened when you click the next button, but the other three buttons( first previews last) are fine.
2、After initial, I Can't recognize the current page(should be with active class with background color)
I have two pages with different initial ways, pageA is ajax, the other pageB is document.ready The document.ready ways works well, and the ajax ways have two problems:
1、there is nothing happened when you click the next button, but the other three buttons( first previews last) are fine. 2、After initial, I Can't recognize the current page(should be with active class with background color)
How to fix it? code as follows.
HTML `
ajax initial(pageA)
function getReply_FirstPage(){
$.ajax({ type: "post", url: "/postapi/getReply",
data:{postID:$('#hide-postID').val(),currentPage:1}, success: function(data) {
$('#div-reply').html(data);
}
document.ready(pageB,works fine)