473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Making a glowing effect in javascript

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 3273
hsriat
1,654 Expert 1GB
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
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 Expert 1GB
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.