Files @ b723e6390acd
Branch filter:

Location: website/www/conservancy/static/js/jquery.outerhtml.js

Bradley M. Kuhn
Format like previous with the <p> solution

<ul> is the right HTML way to format these, but they are all too
close. Get it to look more like it did with <p>'s with CSS.
/*
 * jQuery outerHTML
 *
 * Copyright (c) 2008 Ca-Phun Ung <caphun at yelotofu dot com>
 * 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() 
			: $('<p>').append(this.eq(0).clone()).html();
	}
})(jQuery);