Jquery question

Denver Gamio

Pro Article Writer
Sep 21, 2009
250
1
0
Paris
ezinearticles.com
Hello, I need some help if anyone could aid me out. I am trying to create an outer glow in jquery something on the lines of untitled

the source code can be gotten from nakajima's jquery-glow at master - GitHub

But the problem with the above site is that it works only for text. I need something that can create a outer glow (like in photoshop) for a div box or anything other than text.

Basically the user hovers on the div/span etc and the box should have an outer glow. PS i dont want to achieve this with pictures. Any ideas would be appreciated a lot. Thank you
 


Should be able to just add or edit a line that calls addGlow() using whatever class you want.
In the div or span tag just attach the class.

Example:

// in javascript
$('.hovered-over').addGlow({ textColor: '#f00', haloColor: '#f00', radius: 100 });


.. in html ...

<div class="hovered-over">
<p>paragraph one</p>
<p>paragraph two</p>
<p>paragraph three</p>
<p>paragraph four</p>
<p>paragraph five</p>
</div>

Should be that simple.

The effect looks a bit amateurish though so I'd think hard before actually using.