У меня есть ниже HTML таблицаЗагрузка содержимого при прокрутке
<table id="label" style="width: 100%;">
\t <tr id="tr">
\t \t <td class='td'>
\t \t \t <div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>The Internet connection has</strong></div>
\t \t \t <iframe src="http://www.youtube.com/embed/w9DTUjrPTd0?wmode=opaque" frameborder="0" allowfullscreen width="100%" height="100%" ></iframe>
\t \t </td>
\t \t <td class='td'>
\t \t \t <div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Arsenal vs man city <br> 3-2 <br> \t 23/5/215 <br> أرسنال ضد مانشيستر سيتي</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/aDBDowU_lqc?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t </tr>
\t <tr id="tr">
\t \t <td class='td'>
\t \t \t <div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Communications' second year</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t \t <td class='td'>
\t \t \t <div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t </tr>
\t <tr id="tr">
\t \t <td class='td'><div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t \t <td class='td'><div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t </tr>
\t <tr id="tr">
\t \t <td class='td'><div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t \t <td class='td'><div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t </tr>
\t <tr id="tr">
\t \t <td class='td'><div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t \t <td class='td'><div class="layout" style="position: absolute; z-index: 1; width: 485px; height: 280px; " onclick="this.style.display='none';"><strong>Hello World</strong></div>
\t \t \t <iframe width="100%" height="100%" src="https://www.youtube.com/embed/ToACE9BTSCA?wmode=opaque" frameborder="0" allowfullscreen></iframe>
\t \t </td>
\t </tr>
</table>
Я не хочу, чтобы сделать все строки сразу. Мне нужно отображать только 10 строк за раз, и когда пользователь прокручивает, вертикальная полоса прокрутки, то снова мне нужно добавить еще 10 строк в существующие 10 строк и так далее.
В основном у меня есть все статические строки html, и мне нужно сделать несколько, а затем добавить еще несколько прокруток. Как я могу это сделать?
Атрибут id должен отмечать только один элемент в DOM. Используйте класс для многих элементов. – lmgonzalves
Где находится ваш jQuery/javascript? Что вы пробовали? –
Я много искал и пробовал два метода, но пока не нашел подходящего! – cockro