mercredi 30 décembre 2015

How to select Input checkbox and create automaticaly div in other div

I have an simple form with two checkbox:

<form id="formTest">
        <input type="checkbox" id="imageOne"> <img src="/uploads/imagens/imageone.jpg">
        <input type="checkbox" id="imageTwo"> <img src="/uploads/imagens/imageone.jpg">

</form>  

In jquery

http://ift.tt/1mj84vC

<script>
        $("#formTest").change(function () {       
           $('<div>',{
             id : 'imageTow or One',
           });

        });    
    </script>

How do I to select only one or two or more checkbox and are created divs with images inside the div class = "test"?

Thanks for any help




Aucun commentaire:

Enregistrer un commentaire