Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8506465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:35:55+00:00 2026-06-11T02:35:55+00:00

With this fiddle http://jsfiddle.net/mungbeans/f2ne6/2/ why is the opacity undefined when accessed in js when

  • 0

With this fiddle http://jsfiddle.net/mungbeans/f2ne6/2/

why is the opacity undefined when accessed in js when its defined in the css?

I presume the answer is because the style is also undefined, why is that, does the style need adding somewhere explicitly before the opacity can be defined?

EDIT
the lack of [] is a typo created as I copied from source to fiddle. The style/opacity problem still exits in the original code which is correct in that aspect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:35:56+00:00Added an answer on June 11, 2026 at 2:35 am

    title.style.opacity

    should be:

    title[0].style.opacity

    since getElementsByTagName returns a nodeList.

    EDIT:

    This still doesn’t get the value. You’ll need to do the following:

    window.getComputedStyle(title[0]).opacity

    https://developer.mozilla.org/en-US/docs/DOM/window.getComputedStyle?redirectlocale=en-US&redirectslug=DOM%3Awindow.getComputedStyle

    DEMO: http://jsfiddle.net/f2ne6/12/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a CSS question related to this fiddle: http://jsfiddle.net/r584e/ Here the relevant screenshot
Please look at this fiddle: http://jsfiddle.net/DHts6/1/ Why does it say undefined, even though the
Please take a look at this fiddle http://jsfiddle.net/Qstuw/7/ First answer is selected by default,
In this fiddle http://jsfiddle.net/dAHqe/2/ I've created examples for the 2 main uses (that I've
Referencing this Fiddle ( http://jsfiddle.net/j5uGN ), how can I toggle a clicked image's border
I have this fiddle: http://jsfiddle.net/yub2B/4/ HTML: <input type=text /> <input type=text /> <input type=text
I have this fiddle : http://jsfiddle.net/XjeCf/1/ that works like I want and this one
look at this fiddle: http://jsfiddle.net/ugxNK/ I want that the first list element is in
Please look at this fiddle: http://jsfiddle.net/dyv88/16/ On IE7, if I put width: 100% on
Hi please take a look at this fiddle http://jsfiddle.net/bloodygeese/pwjNQ/1/ I am trying to figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.