Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger("click") checked items are not counted correctly #32

Closed
Paulour opened this issue Oct 26, 2010 · 3 comments
Closed

trigger("click") checked items are not counted correctly #32

Paulour opened this issue Oct 26, 2010 · 3 comments

Comments

@Paulour
Copy link

Paulour commented Oct 26, 2010

Hi Eric

it has been mentioned once in the blog comments and marked as fixed, but it seems to me the problem is still there in the 1.5 release, for example by

var select = 'CH ';
$("#testlist").multiselect("widget").find("input:checkbox").each(function (chkindex) {
if (this.title.indexOf(select)>0) {
if(this.checked==false) {
this.trigger("click").attr('checked', true);
}
}
}

it will report one item less than actually 'x of n items selected'...and will correct itself by any manual select/deselect clicks.

please verify and wish you can correct this, and thanks for such a great extension to the UI collection! :)

Cheers, Paul

@ehynds
Copy link
Owner

ehynds commented Oct 26, 2010

hey, this is a separate issue and there is some flaws in your logic... look here: http://jsfiddle.net/ehynds/VZ7AM/

Triggering click on a checkbox should update everything else, but there is a work around as provided by the demo.

@ehynds
Copy link
Owner

ehynds commented Oct 26, 2010

fixed in c2d214f

@Paulour
Copy link
Author

Paulour commented Oct 27, 2010

hehe, thank you very much for your notes, still quite fresh with JS and the JQuery...and yes actually the multiselect("update") call will do the work already!

Cheers and have a great day, Paul

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants