I\'m trying to create a div and give him a class but it doesn\'t work. Could anybody help me?
$(document).ready(function() { $(\'input[type=checkbox]\').each(fun
$(document).ready(function() { $('input[type=checkbox]').each(function() { $(this).after($('', { class: 'test', text: "a div", click: function(e){ e.preventDefault(); alert("test") }})); }); });
http://jsfiddle.net/yF9pA/1/