Code Monkey home page Code Monkey logo

Comments (6)

Holt59 avatar Holt59 commented on August 19, 2024 1

How many elements do you have in the table? If you have less than 15 then you won't notice a difference.

If this is not the case, I would need data to investigate. Could you send me the generated HTML table?

from datatable.

Holt59 avatar Holt59 commented on August 19, 2024

What "does not work"? The table or one of the command? e.title is likely undefined since you used data from an HTML table, so you need e[n] where n is the number of the relevant column.

from datatable.

tonyng3101 avatar tonyng3101 commented on August 19, 2024

The table still show. But it is not paged

from datatable.

tonyng3101 avatar tonyng3101 commented on August 19, 2024

It is my table now.

<table class="table table-hover" id="MyTable">
			<thead class="thead-dark">
				<tr>
					<th scope="col">STT</th>
					<th scope="col">Class Name</th>
					<th scope="col">Subject</th>
				</tr>
			</thead>
			<tbody>
							<tr>
					<td scope="row">1</td>
					<td><a href="">CP14</a></td>
					<td>2</td>
				</tr>
							<tr>
					<td scope="row">2</td>
					<td><a href="">CP15</a></td>
					<td>3</td>
				</tr>
							<tr>
					<td scope="row">3</td>
					<td><a href="">CP16</a></td>
					<td>2</td>
				</tr>
							<tr>
					<td scope="row">4</td>
					<td><a href="">CP17</a></td>
					<td>0</td>
				</tr>
							<tr>
					<td scope="row">5</td>
					<td><a href="">CP18</a></td>
					<td>3</td>
				</tr>
							<tr>
					<td scope="row">6</td>
					<td><a href="">CP12</a></td>
					<td>3</td>
				</tr>
			</tbody>
</table>

I just change pageSize to 5 but it still not work

from datatable.

Holt59 avatar Holt59 commented on August 19, 2024

I have no issue with your table, did you:

  • Add a <div> for paging? e.g., <div class="paging"></div> after the table?
  • Include both datatable.min.js and datatable.jquery.min.js?

from datatable.

tonyng3101 avatar tonyng3101 commented on August 19, 2024

Thanh for your help! But I still have a question. Can it use for 2 or more table in one page??
I just add an id like $('#MyTable, #Mytable2').datatable but it look not work!

from datatable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.