Blurring a part of a layout using jQuery


I’m trying to blur a part of a page using a square element. For that i use a special jQuery script named foggy.
If I understood well you’ll do it in three steps:

  1. Include the jQuery in the document (by dragging it in the ressources menu)
  2. Create a script and define the element that needs to be blurred (see the code under
  3. Run the script with onload scene.

Until now it didn’t work and I’m aware that I have very little knowledge in javascript. I’ll be very thankful for every help !

See my example: (259.7 KB)

(Greg) #2

When using jQuery add ons, you usually have to add the jQuery library too, so you’ll have the plug-in (foggy) and jQuery in the resources pane. And, usually, jQuery needs to be loaded first - add jQuery then add your plug-in (jQuery.foggy)

Also, in your script you have “$(’.square’)” the dot is for a class whereas a “#” is for an id and you did not have a class name assigned to the square. (207.4 KB)

You might like Hype’s blur function better, I added a blurred box in the demo


Hello Greg,
thank you for your response ! now I’m confused because the final effect is not what I wanted. Everything under the square element should be blurred (text and picture).

(Greg) #4

I’m not sure that jquery.foggy works that way, it looks like it just blurs an element, not makes a window that blurs part of another element.

(strmiska) #5

you have to blur the image and the font seperately. if you blur the font, there´s the trick, that you´ve to use the shadow, colored white blured. then you can play with transperancy. (183.5 KB)

(Greg) #6

You may want to look into this…


thanks Greg I also bumped on this one :wink:

source: 'body',
radius: 7,
overlay: 'rgba(255,255,255,0.4)'});

The source: ‘body’ would be blurred by the target (see the example below)
But I have no idea how to adress my elements as a body ? (118.3 KB)


thank you but see post#3

(Greg) #9

Give the picture (bulbs.jpg) an id (I used ‘#test’) and use that id in the script to replace the word ‘body’…

source: '#test',
overlay: 'rgba(0,100,100,0.1)'
}); (264.5 KB)


Looks good !.. I find out that this plug-in only works with pictures and only one at a time.
Thank you Greg for all your advice. I’m looking for another plug-in or perhaps a new version of Hype who will works with layers like photoshop etc…