Do not repeat click action when creating a table from another
Do not repeat click action when creating a table from another
goxalo
Posts: 4Questions: 1Answers: 0
Hola, en este ejemplo, como podría hacer para que NO me repita el elemento de la fila si le doy clic nuevamente. Gracias
Hello, in this example, how could I do so that the row element does NOT repeat itself if I click on it again? Thanks
http://live.datatables.net/pewasecu/1/edit
This question has accepted answers - jump to:
Answers
How does it repeat itself? Please post the steps top replicate the issue.
Kevin
Maybe post more details about the problem you are trying to solve.
Kevin
Is this what you are looking for?
http://live.datatables.net/pewasecu/9/edit
It uses a global variable to keep track of the clicked row index. If the new clicked row index is different it is processed. Otherwise nothing happens.
Kevin
Exactly, this is what I was looking for to happen.
I didn't know how to ask it in a way that would be understandable by both developers and non-developers.
It would be interesting and very helpful to publish this example that you post for those looking to create a table from another table by selecting elements from the first one, it would be very helpful for many people.
Thanks
I just noticed a problem that does not allow it to be the complete solution and that is that clicking on one row and then on another and clicking again on the one you already clicked puts it in the following table and so on
Yes, that is correct. The example is provided to guide you toward a solution that meets your requirements. One option is to keep track of the clicked rows in an array. Another option might be add a class to the clicked row and update the jQuery selector to not include that class, for example:
http://live.datatables.net/pewasecu/12/edit
Kevin
Perfect, it works, maybe just add a semicolon (;) in line 28 of the example..
Thank you for your patience and time.