jplist icon indicating copy to clipboard operation
jplist copied to clipboard

Loop all pages values?!

Open scascalesageinfoes opened this issue 7 years ago • 3 comments

Hello

I have checkbox inputs in every page and i can select it

When i get the value of it with: $('.container .checkboxItem').each(function () { if ($(this).prop('checked')) {

Only each the actual page of jplist! Any knows the solution to loop all?

Thanks

scascalesageinfoes avatar Aug 23 '17 11:08 scascalesageinfoes

Hello, I'm not sure I understand your issue. Please follow guidelines for reporting issues as described here: https://github.com/1rosehip/jplist/wiki/Reporting-issues

1rosehip avatar Aug 23 '17 15:08 1rosehip

Hello. Very simple... step by step:

  • I have 10 blocks (divs named "container")
  • In each block i have one title (h1) and one checkbox input with class "checkboxItem"
  • I load jplist with five element visualization. This generate 2 pages (5 por first page and 5 for second page)
  • I check the first checkbox input of first div in FIRST page
  • Change to second page and check input of first block in SECOND page
  • Then run this script: $('.container .checkboxItem').each(function () { if ($(this).prop('checked')) { ....

The problem: In jquery each I only have the second input chekbox because I see the second page of jplist only... where is the first I checked in first page? I want that each capture ALL controls in jplist

Thanks

scascalesageinfoes avatar Aug 24 '17 10:08 scascalesageinfoes

The checkbox controls are not related to the specific page number. They works with the whole list of items. Please create a reproducible test case in jsFiddle, jsBin, or Codepen so I could help you.

1rosehip avatar Aug 24 '17 11:08 1rosehip