The code works on Firefox, Safari, Chrome and IE8+ but not in IE7. It causes the content to disappear. I have tried developer tools in IE and if I locate one of the rows in the content and add any CSS to it, the content reappears.
I call the following code on a scroll event. when the $(document).scrollTop()
is close to some value.
$.get('NewMoviesSub.aspx?c=' + (currentSet * 25).toString(), {
curset: (currentSet * 25)
}, function(data) {
var content = $(data).find('.movieTable');
$("#MoviesDiv").append(content);
});
I have stepped through all the other code and the content in $("#MoviesDiv")
disappears when the .append
is triggered in the code. As the get is asynchronous, the change of the content happens some time after the initial call to the function. So that is why I have even turned off the scroll function and I tried a button call to ensure that the function was called only once. But the content still disappeared.
This code is meant to help me continuously get more and more movies.
The new content found in ('.movieTable')
is a table with more rows of movies. Whether I use .append
or .appendTo
I get the same results.
I have looked at other examples where .append didn't work for other people and I tried several of the solutions and none have helped me.
EDIT: The console will output the content
now if you visit https://www.clearplay.com/NewMovies.aspx