Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added background-size property to allow full page blur over a background #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Blur.js
# blur.js

blur.js is a jQuery plugin that produces psuedo-transparent blurred elements over other elements.

This fork fixes the background-size property which now enable us to have full page blur over the background.

## Usage

Expand All @@ -13,7 +14,9 @@ $('.target').blurjs({
});
````

## Defaults
The plugin will get other background properties (background-size, background-repeat, etc.) from the styles specified in the element (inline style), or in your CSS.

## Options

````
$('.target').blurjs({
Expand All @@ -30,6 +33,33 @@ $('.target').blurjs({
draggable: false //Only used if jQuery UI is present. Will change background-position to fixed
});
````
## Note

This is a fork of Blur.js (https://github.com/jakiestfu/Blur.js). Credit goes to original author, Jacob Kelley (https://github.com/jakiestfu).

## Licensing
MIT
The MIT License (MIT)

Copyright (c) 2014 Ignatius Steven (https://github.com/isteven)

Original author: Jacob Kelley (https://github.com/jakiestfu)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


5 changes: 3 additions & 2 deletions blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@
'background-image': 'url("' + blurredData + '")',
'background-repeat': $source.css('backgroundRepeat'),
'background-position': position,
'background-attachment': attachment
'background-attachment': attachment,
'background-size': $source.css('backgroundSize')
});
if(options.optClass != false) {
$glue.addClass(options.optClass);
Expand Down Expand Up @@ -280,4 +281,4 @@
}
});
};
})(jQuery);
})(jQuery);