Closed KNVB closed 5 years ago
I considered this feature in the past. Next time I get to updating it, I will add. If someone else has a chance first, just open a pull request and I'll merge it.
Latest version will automatically grab HTML of any dom element that is provided for the "content" property.
As title,Is it possible to accept an dom object as content? It is because I need to add event handler for the content objects.
Besides that, an issue for noPadContent:true found, my code as the following:
$.jAlert({ noPadContent:true, 'title': "Select a Directory", 'content':msg, 'theme': 'red', closeBtn:false, 'btns': { 'text': 'Ok',class:"w3-red"} });
where msg=<div style="border:1px solid black;padding-top: 0px; margin-top: 0px;"> <ul style="padding: 0px; margin: 0px;"> <li style="margin-left: 10px; list-style: none;"><i class="fa fa-hdd-o"></i> <a rel="C:\" style="cursor: pointer;">C:\</a></li> <li style="margin-left: 10px; list-style: none;"><i class="fa fa-hdd-o"></i> <a rel="D:\" style="cursor: pointer;">D:\</a></li> <li style="margin-left: 10px; list-style: none;"><i class="fa fa-hdd-o"></i> <a rel="E:\" style="cursor: pointer;">E:\</a></li> <li style="margin-left: 10px; list-style: none;"><i class="fa fa-hdd-o"></i> <a rel="F:\" style="cursor: pointer;">F:\</a></li> <li style="margin-left: 10px; list-style: none;"><i class="fa fa-hdd-o"></i> <a rel="G:\" style="cursor: pointer;">G:\</a></li> </ul> </div>
The ok button row wider than bother content and title row.