Skip to content
Browse files

refactored a little, added license and copyright.

  • Loading branch information...
1 parent 95ad274 commit 856a11aa557d70705b0f0cb9ba117ca092818f46 @skoon committed May 4, 2010
View
2 support/borderRadius/TestBorderRadiusSupport.html
@@ -4,7 +4,7 @@
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script type="text/javascript" src="support.borderRadius.js"></script>
+ <script type="text/javascript" src="jquery.borderRadiusSupport.js"></script>
</head>
<body>
<div id="results"></div>
View
21 support/borderRadius/jquery.borderRadiusSupport.js
@@ -1,13 +1,30 @@
+/* jQuery borderRadius support
+ * http://lazycoder.com/jqueryplugins/?p=4
+ *
+ * Copyright (c) 2010 Scott Koon, scott@lazycoder.com
+ * Source code Copyright (c) 2010
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Determines which style properties the element, and therefore the browser,
+ * supports for rounding the border of elements.
+ * Returns an object containing three boolean properties: moz, webkit, and css3.
+ *
+ * Example:
+ * var supportNoDiv = $().borderRadiusSupport();
+ * // support.any will equal true in all browsers except IE
+ */
+
(function($) {
$.fn.borderRadiusSupport = function() {
- var testDiv = document.createElement("div");
var supported = {
moz:false,
webkit: false,
css3: false,
any: false
};
- var primeEl = this[0] || testDiv; //just need to test a single element.
+ var primeEl = this[0] || document.createElement("div");
if(primeEl === undefined) return supported;
if(primeEl["style"] === undefined) return supported;
supported.moz = (primeEl.style["MozBorderRadius"] !== undefined);

0 comments on commit 856a11a

Please sign in to comment.
Something went wrong with that request. Please try again.