android - The click event is made but it isn't showed in the screen -


i'm making mobile application phonegap , jquery mobile. everytime select 1 of menu elements call ws gives me answer show in screen. works there.

as want have better view use code trigger ('create'). (http://jquerymobile.com/demos/1.0a4.1/docs/forms/forms-checkboxes.html insted of refresh have make create)

var listadohtml = '<div data-role="fieldcontain"><fieldset data-role="controlgroup">'; (var i=0;i<resultado.length;i++){     var item = '';     var id = resultado[i]['id'];     item += '<input type="checkbox" name="checkbox-'+id+'" id="checkbox-'+id+'" class="custom" />';     item += '<label for="checkbox-'+id+'">'+resultado[i]["title"]+'</label>';      listadohtml += item; } listadohtml += '</fieldset></div>'; $('#listapreguntas').html(listadohtml).trigger('create'); 

inmediatly after associate event:

$("#listapreguntas input[type='checkbox']").bind( "click", function(event, ui) {... code ...}); 

it shows fine, problem (not always, that's problem) when click checkbox green tick not shown event change made. when happens can see, clicking in other part of screen, have clicked before because refreshes , shows tick.

the conclussions have

  • it not avd because im making tests in mobile phone android 4.0.
  • it appears of code includes jquery mobile when use de trigger.
  • i think not loading time because can wait years , can happens.

as can see not "logic" problem usability one.

thanks in advance!

for checkbox , radio, use change event not click. , keep in mind attaching events dynamic elements different, have updated answer accordingly.

demo

$(document).on('change', '[type=checkbox]', function () {   // code here }); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -