Load AJAX content if an element is visible or becomes visible (depending on an event).