﻿(function($) { $.fn.exists = function() { return this.length > 0 }; $.fn.outerHtml = function() { return $("<div />").append(this).html() }; $.fn.preloadImages = function() { for (var i = 0; i < arguments.length; i++) $("<img />").attr("src", arguments[i]) }; $.fn.removeSelected = function() { return this.each(function() { if (this.tagName == "SELECT") $("option:selected", this).removeAttr("selected") }) } })(jQuery);