I've written a JS program which works fine if I use the following line of code:
li = $("<li data-role='collapsible' data-iconpos='right' data-inset='false'></li>");
But if I change the above line to as follows, it stops working:
li = $('<li/>, {
data-role: 'collapsible'
data-iconpos: 'right'
data-shadow: 'false'
data-corners: 'false'
});
What is wrong here?
EDIT - Additional code that is failing:
a = $('<a/>', {
href: fSelectedContent[i].hPageURL,
click: function () { mSelectCount(fSelectedContent[i].rContentID);},
html: fSelectedContent[i].rContentName
});
<li/>.$:$('<li />')