Return to Snippet

Revision: 31072
at August 28, 2010 20:47 by joernroeder


Initial Code
$.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;
	 }		
});

Initial URL

                                

Initial Description

                                

Initial Title
jQuery.getOrCreateDialog

Initial Tags
jquery

Initial Language
JavaScript