lundi 29 juin 2015

Show all data with class same as the id clicked on

I have a question about Jquery. I want to show all data with the same class as I clicked on.

i made a list of things I can click on. So when I click it, the right data should be shown. I made this but it's not working.

This is my Jquery code:

$("div span").hide();
$('input[type=checkbox]').on("change", function(e) {

    var id = $(this).attr('id'); 
    if(this.checked){
        alert("checked");
        e.preventDefault();

    }else{
        alert("not checked");
    }


});

http://ift.tt/1U1nCAn

Aucun commentaire:

Enregistrer un commentaire