w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

Checkbox group and checkbox item difference

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Checkbox group and checkbox item difference

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...

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

Checkbox group and checkbox item difference

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

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

Checkbox group and checkbox item difference

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.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

Checkbox group and checkbox item difference

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?

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

Checkbox group and checkbox item difference

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.

Return to “Issues”