How to make div glow with jquery

I wonder how to make a div glow in a specific color when the page loads.

<div id="glow" class="logo registrer"><a href="http://henricson.net/registrer.php" class="understrek">Registrer deg</a></div>

This is the div I want to highlight. Thank:)

+5
source share
3 answers

CSS3 can do this:

-webkit-box-shadow:0 0 20px blue; 
-moz-box-shadow: 0 0 20px blue;
box-shadow:0 0 20px blue;

Here's a JSFiddle that shows that it really works with me, check it out to see :)

+7
source

I'm not sure how you are going to shine? If you just change the color, you can do something like below.

$(document).ready(function(){
   $('#glow').animate({backgroundColor:'green'});
});

Then you can add a few box-shadowto add a glow effect.

-webkit-box-shadow: 0px 0px 5px 5px rgba(0, 150, 0, 0.3);
box-shadow: 0px 0px 5px 5px rgba(0, 150, 0, 0.3);

Please see in this example the fiddle of the animated background color and shadow.

EDIT

, , , .

fiddle, , ... , .

+3
<div class="col-md-6 col-md-offset-3" id="notificationmain">
  <div class="sub"><blockquote id="notification" class="alert alert-success" glowing="0">User Has been created</blockquote></div>  

    <script>
        $(document).ready(function() {
            setTimeout(function () { $('.sub blockquote').glow('#FFFFDD', 800); }, 100);
        });
    </script>
</div>

You need to specify

<script src="~/Scripts/jquery.glow.js"></script>
+1
source

All Articles