You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know what would be the best way to reinitialize script after an AJAX call. I have post items, each in
container with data-color attribute. I use jquery.inview to change body background color:
$('article').on('inview', function(event, isInView) {
if (isInView) {
var spalva = $(this).attr('data-color');
$('body').css('background-color', spalva);
}
});
However, after and AJAX call this script only works with posts displayed on page load. Therefore I need to reinitialize jquery.inview after the call. I would be very grateful if someone could help me what would be the best way to do it.
The text was updated successfully, but these errors were encountered:
Hello,
I would like to know what would be the best way to reinitialize script after an AJAX call. I have post items, each in
container with data-color attribute. I use jquery.inview to change body background color:However, after and AJAX call this script only works with posts displayed on page load. Therefore I need to reinitialize jquery.inview after the call. I would be very grateful if someone could help me what would be the best way to do it.
The text was updated successfully, but these errors were encountered: