i read and search but i don´t get it. :( I have a HTML-site with a lot of data. So i only want this:
For example:
<html>
<head>
<javascript code to load and check the visible of the divs>
</head>
<body>
<div id="i am visible because i am in the vieport>Some content</div>
.
.
.
<div id="i am the next div with included content, but i am not in the viewport on start, only when a user is scrolling><?php include 'somefile.php'; ?></div>
.
.
.
<div id="i am the next div with included content, but i am also not in the viewport on start, only when a user is scrolling><?php include 'somefile2.php'; ?></div>
.
.
</body>
</html>
Please can anybody help me. I am good at php, but i don´t understand javascript so good :(
Thanks, RonnyDee
What you are asking for must be done with client-side code, this means code that is executed on the client side (the user's browser). You have to use for example JavaScript for this. This cannot be done with PHP on the server-side.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.