jeudi 4 janvier 2018

how to use a tick mark as a checkbox [duplicate]

This question is an exact duplicate of:

I have multiple checkboxes which I set by the following code:

 var desc = $('<span id="test"><input type="checkbox" class="multiselect-markets"></span><span style="padding-left:2px;padding-right:4px"><i class="fa fa-chevron-right" aria-hidden="true" style="font-size: 11px;"></i></span><span>' + description + '</span>');

which gives me the following textbox:

gives me the following checkbox

I want to change the above check box to the following way:

enter image description here

Is there anyway I can change the above desc code to achieve the above ticked checkboxes?

I tried this which just shows the tick, but doesn't act like a checkbox:

$("#test").html('&#10004;'); 




Aucun commentaire:

Enregistrer un commentaire