I’m using @Premasagar’s nitelite jquery plugin https://github.com/premasagar/nitelite to create a lightbox for my site. I am calling with the function below. It’s all good except that jquery’s adding slashes to the end of my single <p> tags – so they become <p class="close"/>Content<p/> instead of <p class="close">Content</p> I assume this is to make valid xhtml when people add tags like <img> or <input> – so what is the correct syntax here?
var lb = $.nitelite();
lb.open(
$('<div></div>', {
html: 'hello world',
})
.append('<p class="close">')
.append(
$('<a></a>', {
click: function() {
lb.close();
return false;
},
href: '#',
html: 'Close'
})
)
.append('</p>')
);
Can’t you use the same method for
<p>as for<div>?Like: