Skip to content

Commit

Permalink
Merge pull request #2 from d7p/master
Browse files Browse the repository at this point in the history
In Jquery 1.9 the $.browser function was removed. This now looks at the ...
  • Loading branch information
vonKristoff committed Jul 28, 2013
2 parents 8dc26ec + 5066551 commit 234a4bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions shards.html
Expand Up @@ -14,8 +14,8 @@
</head>
<body>
<div id="bg"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="shards.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="shards.js"></script>
<script>
(function($) {
$('#bg').shards([10,35,180,.15],[255,20,220,.25],[0,0,0,.25],20,.58,2,.15,true);
Expand Down
9 changes: 5 additions & 4 deletions shards.js
Expand Up @@ -32,14 +32,15 @@ Plugin.prototype.init = function(){

this.cssPrefix = false;

if($.browser.webkit) {
var ua = navigator.userAgent;
if(/Chrome\/(\S+)/.test(ua)|| /AppleWebKit\/(\S+)/.test(ua)) {
this.cssPrefix = '-webkit';
}
else if($.browser.mozilla) {
else if(/Firefox\/(\S+)/.test(ua)) {
this.cssPrefix = '-moz';
}else if($.browser.opera) {
}else if(window.opera) {
this.cssPrefix = '-o';
}else if($.browser.msie) {
}else if(/MSIE ([^;]+)/.test(ua)) {
this.cssPrefix = '-ms';
};

Expand Down

0 comments on commit 234a4bb

Please sign in to comment.