So, as you can see in the code below I want to create an HTML element, actually a div with class but since I need to create a div like this: <div class="btn btn-danger">Close</div>, this is not working for me. Here is the code:
close: function () {
var $this = $(this);
$('<div class=btn>Close</div>')
.appendTo('p')
.on('click', function () {
$this.slideUp();
});
}
Thanks for your answers!