Posts Tagged ‘javascript’

An Easy Fix for a Minor Annoyance When Creating Widgets or Shareable Content

Saturday, October 11th, 2008

For the last couple days I’ve been dabbling with creating a Javascript that will allow visitors to one of my websites to embed my content in their sites.  (It’s done and you can check it out at http://www.angieshealth.com/article-widget/)

To make it easier on my visitors when copying and pasting the code I decided to use Javascript to select all the code when they click on the textbox.
(more…)

Advanced Facelift Techniques - First Letter of Paragraph Effect

Wednesday, August 20th, 2008

Facelift can be used for more than just adding decorative headers to your web pages.  Combine Facelift with a little bit of Javascript and you can really do some pretty cool things.  This is the first part in a series of posts detailing what you can do to take Facelift further.
(more…)

Fun with Facelift - An experiment to add fonts to textboxes

Wednesday, August 20th, 2008

I was bored tonight so I decided to throw something together that I’d been thinking about:  Combing Facelift with an input textbox.

I quickly threw together a proof of concept and it actually came out pretty well.  Of course, this really doesn’t have any real world application but it is kinda cool.

Open the Dynamic Font Textbox Test Page

Facelift v1.2 b3 is coming very soon and I’ll also be including an upgraded and fixed QuickEffects plugin.

Detecting if images are disabled. (CSS On / Images Off scenario)

Sunday, August 17th, 2008

It was recently brought to my attention that Facelift Image Replacement wasn’t displaying in all browsers properly when images were turned off.  It seems I only tested this scenario in Firefox 3, which beautifully handles the situation.

The rest of the browsers weren’t so nice.  Safari displays nothing, IE displays a box with the alt text in an ugly small font, and Opera puts a box around the text.
(more…)

Oh IE, why do you fight me so? Hover/mouseover just isn’t quite right

Saturday, August 9th, 2008

I’ve been working on facelift v1.2 and one of the upgrades is element hovers.  And I’ve done it!  Or so I thought… they work like a dream in all browsers except Internet Explorer.  They just wouldn’t change colors.

After investigating further, I found out that IE doesn’t apply the :hover CSS changes until AFTER the mouseover event is done.  Which means, you can’t get an elements :hover style.

After playing around for a bit, I did discover a less-than-elegant solution to this problem that I’m going to have to implement, even though I don’t want to.  Using setTimeout to retrieve the currentStyle will allow you to get the proper value during the event, even when setTimeout’s delay is set to 0.  I’m not sure why this works, but it does.

I’ve setup a test page that illustrates the problem and the solution.  View “IE Mouseover currentStyle Problem” Test Page.

© 2009 Cory Mawhorter