/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$.extend({ /** * Create DialogBox by ID * * @param { String } elementID */ getOrCreateDialog: function(id) { $box = $('#' + id); if (!$box.length) { $box = $('<div id="' + id + '"><p></p></div>').hide().appendTo('body'); } return $box; } });