Dave's Brain

Browse - Programming Tips - How do I highlight (briefly glow a box) with jQuery?

Date: 2009dec18
Language: javaScript
Keywords: glowbox

Q.  How do I highlight (briefly glow a box) with jQuery?

A.  There's a example on the official jQuery site:
http://docs.jquery.com/UI/Effects/Highlight

But they get jQuery from jqueryui.com and I prefer getting it from googlecode.com.
I removed some extra stuff and reworked it a bit giving this example:

<link type="text/css" href="http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/ui.all.css" rel="stylesheet" /> <script src="http://jquery-ui.googlecode.com/svn/tags/latest/jquery-1.3.2.js"></script> <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/effects.core.js"></script> <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/effects.highlight.js"></script> <script> $(document).ready(function(){ $('#myglowbox').click(function () { $(this).effect('highlight', {}, 3000); }); }); </script> <div id=myglowbox style="width: 100px; height: 80px; background: #666; border: 1px solid black; text-align:center;">Click me</div>

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.