Shawn Olson Guestbook

Shawn Olson Guestbook

Brian H said: [ Regarding Altering CSS Class Attributes with JavaScript ]

Your script doesn't seem to work on any CSS properties that contain a dash (background-color, z-index, border-bottom-color, etc). Is there any specific reason for this? I'd like to be able to use this nice, simple script to move around the z-index of certain elements on a page.


Subscribe to this guestbook 

Gliktch Media said: [ See Comment Stimulus ]

(Replying to Brian H)

When using Javascript to modify/read a z-index, you have to use "zIndex" instead. I'm guessing the other properties you mentioned (pretty much anything with a hyphen or dash in it) would have a similar counterpart. This is so the function can differentiate between something like this:

variable1-variable2+variable3
and
variable-with-dashes

Capiche? ;)


Please note that not all of the ideas, opinions and statements made in this guestbook necessarily represent the views and opinions of Shawn Olson.

This guestook is kept spam-free by the protection of the GoodGuest System.

Featured Articles by Shawn Olson

sitemap RGB Color Columbus Photography Free Word Search Maker monty hall game Hangman John Dewey