473,473 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Making a glowing effect in javascript

6 New Member
Hey all, forgive the improper formatting as I am posting this from my blackberry at work.

Anyway, I am developing a website for a client. He recently informed me of features he wants. These can easily be done in flash but I am a big anti flash guy for multiple reasons. Plus I don't know flash. I know I can do certain things in javascript to imitate flash but one thing puzzles me.

How could I apply a glowing effect to an element, a div for example? Here's the situation. I need to make a button that will fade from non glow to glow onmouseover and reversed for onmouseout. I figure animated gifs can do this but I am interested to know if I can do this without images.

I am currently using John Resig's great jQuery library so I figure maybe if I create a glow effect, place it over the div containing the link. I make the glow display: none, then I could just fade the glow in and then fade it out. If it comes down to it I might settle and just use flash but I would like to avoid that if possible. Thanks for any help with my incredibly non standard hack attempt :)

Chuck
May 4 '08 #1
3 3275
hsriat
1,654 Recognized Expert Top Contributor
How could I apply a glowing effect to an element, a div for example? Here's the situation. I need to make a button that will fade from non glow to glow onmouseover and reversed for onmouseout. I figure animated gifs can do this but I am interested to know if I can do this without images.

Chuck
Use settimeout() to continually change the background color of the divs after certain time intervals, until the final color is obtained.

But for the fading effect, either you need to get a list of intermediate colors hard coded, or make a function which can increment the HSL value of color each time you call that function.

google for HSL colors, you may find what's it.
May 4 '08 #2
Chuckhriczko
6 New Member
Ok. I already have jquery which I use for fading so that's no issue. And I have a color tweening library I found somewhere so that works for colors but it doesn't "glow". I think I will just give up though for now and use flash. Its only one menu that will use flash. Thanks anyway though.
May 4 '08 #3
hsriat
1,654 Recognized Expert Top Contributor
Ok. I already have jquery which I use for fading so that's no issue. And I have a color tweening library I found somewhere so that works for colors but it doesn't "glow". I think I will just give up though for now and use flash. Its only one menu that will use flash. Thanks anyway though.
Glowing is obtained by changing the color slowly to brighter ones of the same tone (same hue value, but higher brightness).

You are welcome :)
May 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Christopher Jeris | last post by:
I am relatively new to JavaScript, though not to programming, and I'm having trouble finding the idiomatic JS solution to the following problem. I have a table with (say) fields f1, f2, f3. I...
6
by: Laphan | last post by:
Hi All I know this might sound a strange subject post, but I'm doing a photography web site and I'd like to make an effect whereby my pictures are a sort of slanted, drawing pin to the wall...
36
by: spence | last post by:
Hi All How do I make it so that when a user clicks in a search text field, the default entry (in this case "Search") is removed automatically - they are then faced with a blank search box and...
2
by: Stewart | last post by:
Originally posted in comp.lang.javascript: Newsgroups: comp.lang.javascript From: "Stewart" Date: 23 Aug 2005 02:50:04 -0700 Local: Tues, Aug 23 2005 10:50 am Subject: FireFox, RemoveChild,...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
15
by: Sam Kong | last post by:
Hello! I got recently intrigued with JavaScript's prototype-based object-orientation. However, I still don't understand the mechanism clearly. What's the difference between the following...
1
by: nicky77 | last post by:
Hi, apologies in advance is this may be a nonsensical ramble, but I'm hoping someone can give me some advice on how to solve the following problem: I'm developing a site where the main content is...
12
by: Prisoner at War | last post by:
Yeah, but that requires installing the Flash plug-in. If it's otherwise possible -- which it seems to be -- CSS/JavaScript is more powerful than I'd thought! Anyway, it's a technical...
7
by: Steve Swift | last post by:
How close can you get to making a submit button look like a link? Answers to the inevitable questions: 1. Because I don't want my email address (which would have to be part of the URL in a...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.