Reputation: 625
I'm using Vague.js to blur a div
but I can't seem to get it working.
My JavaScript:
$(document).load(function() {
var vague = $('.zero').Vague({
intensity: 3,
forceSVGUrl: false
});
vague.blur();
});
I've tried $(document).ready(...)
first, that didn't work, so I switched to .load(..)
HTML:
<div class="block zero">
<img src="images/rb.png" />
</div>
CSS:
.zero {
background: url(../images/11.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Upvotes: 0
Views: 313
Reputation: 2289
Make sure the permissions on the Vague.js are set to 755. Assuming a LAMP stack of course.
Upvotes: 0
Reputation: 38102
Try to use:
$(window).load(function() {
or:
$(document).ready(function() {
instead of:
$(document).load(function() {
Upvotes: 3
Reputation: 115222
Change $(document).load(
to $(document).ready(
$(document).ready(function() {
var vague = $('.zero').Vague({
intensity: 3,
forceSVGUrl: false
});
vague.blur();
});
or use
$(window).load(function(){
or use Shorthand for $( document ).ready()
$(function(){
Upvotes: 6