How do I target "show entries" dropdown

How do I target "show entries" dropdown

divebomb33divebomb33 Posts: 9Questions: 3Answers: 0

I'm using a datatable and the "show entries" dropdown is set up to show 10, 25, 50, and All entries. I'm trying to target "all" entries in a script, but not sure how since I can't easily manipulate that part of the code. I'd like to target "all entries" on click of a link, but am not sure how. Any assistance would be greatly appreciated.

Answers

  • allanallan Posts: 61,611Questions: 1Answers: 10,089 Site admin

    What do you want to do with the "all" entry? Do you just want to change the text, in which case use lengthMenu.

    Allan

  • divebomb33divebomb33 Posts: 9Questions: 3Answers: 0

    I want to be able to click on a seperate link above the table and have the table open to show all. It's part of a more in depth js script I'm trying to write but I'm stuck on this part.

  • allanallan Posts: 61,611Questions: 1Answers: 10,089 Site admin

    To check my understand - you want to have links rather than a select list? This plug-in will do that.

    Allan

  • divebomb33divebomb33 Posts: 9Questions: 3Answers: 0

    I have a standard table with all of its components. The "show entries" dropdown element contains 10, 25, 50, and all. It's defaulted to show 10 which I would like. I have a row in the table with a link that says "Select all entries in this table." When this link is clicked I'd like the action to select the "all" in the dropdown showing the user the entire table.

  • allanallan Posts: 61,611Questions: 1Answers: 10,089 Site admin

    Okay sorry - I had no idea that that was what you wanted before. use the rows().select() method to select rows.

    Allan

This discussion has been closed.