jquery 에서의 outerHTML

/*
* jQuery outerHTML
*
* Copyright (c) 2008 Ca-Phun Ung 
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://yelotofu.com/labs/jquery/snippets/outerhtml/
*
* outerHTML is based on the outerHTML work done by Brandon Aaron
* But adds the ability to replace an element.
*/
(function($) {
	$.fn.outerHTML = function(s) {
		return (s) 
			? this.before(s).remove() 
			: $('

').append(this.eq(0).clone()).html(); } })(jQuery);

'CSS & HTML' 카테고리의 다른 글

바코드 39  (0) 2011.07.06
html 태그 <...> 삭제하기  (0) 2010.06.23
Jquery  (0) 2010.02.05
IE 이미지 툴 안나오게.  (0) 2010.02.04
글자 그림자 효과  (0) 2010.02.02