Code Monkey home page Code Monkey logo

blur.js's Introduction

jakiestfu's GitHub stats

blur.js's People

Contributors

jakiestfu avatar unclechu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blur.js's Issues

Improvement or out of scope?

Do you feel like adding the functionality to blur all html content, including text, inline images and videos is appropriate for this script?

If so, got any ideas?

Safari Private Browsing Mode

I just noticed that blur.js doesn't work on a site that I built if you're viewing it in iOS's Private Browsing Mode. What's worse is that it actually breaks all following JS, but doesn't throw any errors. Any idea if there's something I can do to work around this?

Doesn't work in Chrome

Demo (all files locally) loaded in latest Chrome v43 gives JS error "Cannot access local image". Fx works fine.

Not working in Chrome (and Firefox)

Chrome is completely blocking the script, if you want to access the target also as source. Firefox instead still shows an error, with an information about JS access to file://.

Any fix?

More Methods

I am finding that attempting to blur multiple images in direct succession (like in a jQuery.each() function) results in the first image failing. Since this is the case, it would be very useful to have an onFinished() method for the plugin to provide some form of notification as to when it is ok to blur another image. Any thoughts?

dynamic background without draggable ?

Hello,
is there a way to have the draggable background behavior
but without being able to drag the div ?

This would be awesome helpful if you have a fullscreen background image but want to keep things look transparent when resizing the page.

Best Regards
Marc

only one element at a time, 'body' as target not working

Hi so I have a page with many layered divs, and I would them ALL to be blurred my a floating object. However body does nothing, and as I proceed through all the div's classes that are under the floating blurring div, only the ONE class that I list is blurred.

Should I assign a common cass to all elements or list al the classes in the target field?

A problem with background-attachment: fixed;

If I use code:

.main {
    display: block;
    margin: 0 auto;
    width: 1000px;
    background: url(../images/bg.jpg) no-repeat;
    background-attachment: fixed;
    background-position: top center;
}
            $('.textbox').blurjs({
            source: '.main',
            radius: 20,
            overlay: 'rgba(255,255,250,0.4)'
            }); 

blur.js incorrectly calculates the background-position: top center; position of the .textbox 's blured background. I have blured window not at the same location then background of .main

Blur background position depends on the width of the browser window.

what is target and source?

i'm confused .... i don't understand what is meant by target and source. Also, i see "body" listed for source in all the demos. I don't use body.

I just want to blur the background for a div that has one or more background images assigned.
e.g.

<div id="mydiv">this div has 2 layered background-image(s) that i want blurred </div>

$("#mydiv".blurjs(); // blur it!

This doesn't work. Please clarify, thanks.

Err File Not Found

hi, i just try and follow all instruction, but when i insert the selector to target i found this
untitled, how i can fixed this, thank's

GET http://rymate.x10.mx/test/none 404 (Not Found)

Getting the following error in the chrome javascript console

$('#container').blurjs({source: 'body',radius: 10});
[

​… ] GET http://rymate.x10.mx/test/none 404 (Not Found) blur.min.js:285 (anonymous function) blur.min.js:285 jQuery.extend.each jquery-1.7.1.js:658 jQuery.fn.jQuery.each jquery-1.7.1.js:271 $.fn.blurjs blur.min.js:199 (anonymous function) InjectedScript._evaluateOn InjectedScript._evaluateAndWrap InjectedScript.evaluate

My code is in this gist https://gist.github.com/anonymous/6159981

How do I fix it? What am I doing wrong?

Source options

Not an issue, more of a feature request. Would it be possible to use a direct image src path as the source for the blur?

Problem using blur.js on bootstrap navbar in Wordpress

Hi

I'm trying to integrate the blur.js on my bootstrap navbar-default in a wordpress theme I'm developing (http://itu.dk/people/mron/wordpress/). I want everything behind the navbar to be blurred as you scroll down the site. I should probably mention that I'm fairly new to programming.

I have linked to the file on my server from functions.php, and included the following code in my header.php, but within the body tag:

<script>
        $(document).ready( function() {
            $('.navbar-default').blurjs({
                source: 'body',
                radius: 30,
            });
        });
</script>

It isn't working, and I don't know why. Have I done anything wrong?

2 diffrent source for diffrent divs

Hi.
I want use smth like
$('#blur-target').blurjs({
source: '#blur-source',
radius: 20
});

$('#blur-target2').blurjs({
    source: '#blur-source2',
    radius: 20
});

But only last div is blurred.
How make it work with 2 diffrent sources?

"Cannot access image" - because netscape is undefined.

Going off the rough explanation from the readme, I tried my luck and tried to create a small demo. It turned into this:

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="jquery-1.11.1.js"></script>
        <script type="text/javascript" src="blur.js"></script>
        <style>
            body {
                background-image: url("http://localhost:8080/cdn/theme/images/bg.jpg");
                background-repeat: no-repeat;
                background-position: center center;
                background-attachment: fixed;
                height: 100%;
                width: 100%;
                color: white;
            }

            .block {
                height: 250px;
                position: absolute;
                top: 200px;
                left: 100px;
                right: 100px;
                background: rgba(0,0,0,0.6);
            }
        </style>
    </head>
    <body>
        <div id="app">
            <div class="block">ovo</div>
        </div>
        <script>
            jQuery(function($){
                $(".block").blurjs({
                    //source: 'body',
                    radius: 5,
                    overlay: 'rgba(255,255,255,0.4)'
                });
            });
        </script>
    </body>
</html>

Upon launching, I got the "cannot access image" error. On further reading, it was due to the netscape object not being defined.

What am I doing wrong here - or, what exactly can I do to fix it?

[feature request] Fade change image/source

Hi,

I LOOOOVE this script, and this is not an issue at all. I just need this for a slider, and currently I have to fade the whole slider (which leaves a blank space for like .8s) - I'd like to be able to change the image/source by like fading them? Is this, or will this be possible? It would be hugely awesome!

Thanks you so much 👍

Minification Error

I've got this script working fine, but it's causing some JS errors if I try to minify it. Any chance you could provide a minified version?

GET http://{PATH}/one 404 (Not Found) blur.js:279

Hi,

I really want to use your script in a Wordpress theme I am developing, but calling the blurjs() function on my desired object, I get the following error in my console.

GET http://{PATH}/one 404 (Not Found) blur.js:279
(anonymous function) blur.js:279
x.extend.each jquery.js:3
x.fn.x.each jquery.js:3
jQuery.fn.blurjs blur.js:193
(anonymous function) core.blur.js:2
c jquery.js:3
p.fireWith jquery.js:3
x.extend.ready jquery.js:3

Do you have any idea what I am doing wrong?

Thank in advance,

Elliott

about the size of the img generated

hi, i wanna know why the code below is like this:
if(options.overlay != false) {
ctx.beginPath();
ctx.rect(0, 0, tempImg.width, tempImg.width);
ctx.fillStyle = options.overlay;
ctx.fill();
}
my point is that why u draw a rectrangle using the img'width to make it a squre?

Chrome redraw bug on fixed background image

On chrome when I scroll down the target elements don't get new blurred images till the mouse hover them, but when I open the library website blurjs fixed background example It works on the same browser, why do I get redrawing issue with blurjs?
JS:
$('.panel').blurjs({
radius: 2,
overlay: 'rgba(255,255,255,0.4)',
draggable: true
});
CSS:
body{
background: url('../images/1.png');
background-position: top left;
background-repeat: repeat;
background-attachment: fixed;
}

background-size messes up the image in the blurred div

For default the image is much larger than the screen, so I added background-size: 100% 100% in order to only fit the screen, but when I do that it doesn't seem to update the blurjs div so it blurs the image without changing the image size

Using blur.js breaks the Chrome inspector

When I use blur.js on a page and use the Chrome inspector, the inspector locks up and if left long enough, it will crash. Appears to only happen in Chrome, but I can successfully reproduce it on several machines.

base64 image

Hi, its possible to blur an base64 based image?

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.