I use a jquery mobile listview which creates dynamic his entrys.
The list entries contain a flip toggle switch, in each entry of the listview.
But something going wrong that i couldn't find.
There a always 2 flip toggle switches in in each entry, one who's working an one who's not taking action by mouse events.
Here my code
I've a short example on http://jsfiddle.net/joergtiedemann/zSXS3/3/
JS:
function Update() {
$('#functionlist ul li').remove();
var newListTitle = $('#titleTemplate').clone();
newListTitle.appendTo('#functionlist ul');
var newEntryRow = $('#entryTemplate').clone();
newEntryRow.appendTo('#functionlist ul');
$( '#flip-1').slider('refresh');
$("#functionlist").trigger('create');
$("#functionlist").listview('refresh');
};
Update();
This shows what happens Can anyone help me please.
Fixed it. The problem was that, on line 7, you had the button run
.clone()
, which made two buttons.Updated JSFiddle: http://jsfiddle.net/zSXS3/5/