Page 1 of 1

Checkbox group and checkbox item difference

Posted: Mon May 13, 2013 4:15 pm
by w

Can somebody explain me clearly how to address checkboxes in Tiggzi, and what is the programmatic difference between the checkbox group and the checkbox item?

Especially with for example 1 checkbox, Tiggzi creates a checkbox group and a checkbox item.
On which elements do I have to call the methods? For example checkboxradio('refresh')? It seems to be different for val(), is(:checked), prop('checked')? And what about trigger('change') , this is all giving mixed results if applied to the checkbox group or the checkbox item.


Checkbox group and checkbox item difference

Posted: Mon May 13, 2013 4:48 pm
by maxkatz

Checkbox group is two or more check boxes. An check box item, is a single check box. To learn the API, you should check jQuery Mobile docs. Let us know if you have any specific questions.

http://view.jquerymobile.com/1.3.1/di...


Checkbox group and checkbox item difference

Posted: Tue May 14, 2013 6:51 am
by w

If I use the checkbox "value change" event, this event is fired 2 times when I click the single checkbox. Is this standard behaviour?


Checkbox group and checkbox item difference

Posted: Tue May 14, 2013 6:56 am
by w

I just used the "value change" event that is available from the Tiggzi gui. There I do "select action" "run javascript". In the javascript I just put an alert box, or a console.log("xx"), and this is shown 2 times when I test the app and select the checkbox.


Checkbox group and checkbox item difference

Posted: Tue May 14, 2013 7:18 am
by w

Also, when checking the state of the checkbox in javascript, it is not working:

Tiggzi('chkItemFavoriet').prop('checked') gives UNDEFINED

and $('input[name="chkItemFavoriet"]').is(':checked') gives FALSE

my checkbox is named 'chkItemFavoriet'

Anyone has a solution?


Checkbox group and checkbox item difference

Posted: Tue May 14, 2013 7:32 am
by w

This is what happens if I do the checking on the name of the control GROUP I defined in Tiggzi instead of the name of the checkbox item:

Tiggzi('chkFavoriet').prop('checked') : UNDEFINED $('input[name="chkFavoriet"]').is(':checked')): TRUE

Somebody agrees that this is inconsistent or strange behaviour?

That's why I was asking what Tiggzi is doing with the control group and individual checkboxes, from a programmatic point of view, because the checkbox checking and setting is unpredictable.


Checkbox group and checkbox item difference

Posted: Tue May 14, 2013 12:45 pm
by Kateryna Grynko