🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Asia Chan
    Asia Chan
    11,007 Points

    Why use "color" instead of "$color" in naming the variable?

    Posted May 19, 2017 4:21am by Asia Chan
    Asia Chan
    11,007 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Chad Erdman
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Chad Erdman
    Front End Web Development Techdegree Student 4,917 Points

    "Uncaught ReferenceError: color is not defined"

    Posted January 18, 2017 1:40am by Chad Erdman
    .a{fill-rule:evenodd;}techdegree
    Chad Erdman
    Front End Web Development Techdegree Student 4,917 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Kuzo Geko
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Kuzo Geko
    Full Stack JavaScript Techdegree Student 3,271 Points

    I don't really understand what siblings method can do

    Posted September 12, 2016 9:45am by Kuzo Geko
    .a{fill-rule:evenodd;}techdegree
    Kuzo Geko
    Full Stack JavaScript Techdegree Student 3,271 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Fatih Hamzah
    Fatih Hamzah
    8,666 Points

    Uncaught ReferenceError: color is not defined... while checking on Console.

    Posted August 21, 2016 10:10pm by Fatih Hamzah
    Fatih Hamzah
    8,666 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • James Barrett
    James Barrett
    13,253 Points

    What exactly is the color variable being used for?

    Posted August 15, 2016 1:57pm by James Barrett
    James Barrett
    13,253 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • lesak
    lesak
    6,260 Points

    Why are the siblings deselected first in the click function before the class "selected" is added to the clicked element?

    Posted June 29, 2016 10:21am by lesak
    lesak
    6,260 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    3 Answers

  • Gavin Broekema
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Gavin Broekema
    Full Stack JavaScript Techdegree Student 22,443 Points

    $(this)

    Posted April 29, 2016 2:44am by Gavin Broekema
    .a{fill-rule:evenodd;}techdegree
    Gavin Broekema
    Full Stack JavaScript Techdegree Student 22,443 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Ron Gootman
    Ron Gootman
    24,409 Points

    Why in this case var is color and not $color?

    Posted March 18, 2016 6:47am by Ron Gootman
    Ron Gootman
    24,409 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Javid Abbasov
    Javid Abbasov
    9,243 Points

    why????

    Posted March 12, 2016 5:42pm by Javid Abbasov
    Javid Abbasov
    9,243 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Henrik Christensen
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Henrik Christensen
    Python Web Development Techdegree Student 38,322 Points

    Why does my code not work?

    Posted March 6, 2016 7:58pm by Henrik Christensen
    .a{fill-rule:evenodd;}techdegree
    Henrik Christensen
    Python Web Development Techdegree Student 38,322 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    4 Answers

  • Yijiao Wang
    Yijiao Wang
    1,793 Points

    color decoration question

    Posted January 12, 2016 7:22am by Yijiao Wang
    Yijiao Wang
    1,793 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Matt Schaefer
    Matt Schaefer
    6,039 Points

    var color declaration question

    Posted January 10, 2016 11:28pm by Matt Schaefer
    Matt Schaefer
    6,039 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • oren tal
    oren tal
    5,738 Points

    why should we deselect?

    Posted December 28, 2015 10:55am by oren tal
    oren tal
    5,738 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Jesus Bayona
    Jesus Bayona
    4,937 Points

    How do I know what element of the HTML to select? Is there absolutely only one way?

    Posted December 11, 2015 10:51pm by Jesus Bayona
    Jesus Bayona
    4,937 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Sumama Waheed
    Sumama Waheed
    1,819 Points

    Not selecting other colors? Where did this "selected" come from? I would appreciate a brief explanation on its usage.

    Posted November 15, 2015 8:33pm by Sumama Waheed
    Sumama Waheed
    1,819 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Krista Nordgren
    Krista Nordgren
    3,454 Points

    Not selecting

    Posted November 13, 2015 2:22am by Krista Nordgren
    Krista Nordgren
    3,454 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Melissa Kepler
    Melissa Kepler
    11,369 Points

    perform: Part 1 code vs. the code from the download

    Posted September 29, 2015 5:37pm by Melissa Kepler
    Melissa Kepler
    11,369 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    0 Answers

  • Ryan Herlihy
    Ryan Herlihy
    7,448 Points

    Cannot select different colors in control list. The code is exactly the same, why isn't it working?

    Posted September 23, 2015 11:40pm by Ryan Herlihy
    Ryan Herlihy
    7,448 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • M Fen
    M Fen
    9,858 Points

    Why does this work?

    Posted September 11, 2015 1:52am by M Fen
    M Fen
    9,858 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Kevin Faust
    Kevin Faust
    15,353 Points

    theres no background-color in the "selected' class???

    Posted August 18, 2015 11:44pm by Kevin Faust
    Kevin Faust
    15,353 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Steven Quinn
    Steven Quinn
    12,519 Points

    Is setting the value of the color var inside the function redundant?

    Posted August 18, 2015 3:46am by Steven Quinn
    Steven Quinn
    12,519 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    0 Answers

  • Ryan Broughan
    Ryan Broughan
    12,743 Points

    Spellcheck? It takes me a long time to notice mispelled words.

    Posted May 19, 2015 4:32am by Ryan Broughan
    Ryan Broughan
    12,743 Points
    • CSS
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Alexander Soroka
    Alexander Soroka
    3,769 Points

    I'm not understanding where the class 'selected' is being declared.

    Posted April 28, 2015 3:48pm by Alexander Soroka
    Alexander Soroka
    3,769 Points
    • CSS
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Ryan Sherry
    Ryan Sherry
    12,449 Points

    Why does my code not work correctly for selecting different colors when using functions within functions?

    Posted April 15, 2015 6:27am by Ryan Sherry
    Ryan Sherry
    12,449 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Jon Hampson
    Jon Hampson
    10,990 Points

    Failed to load resource: net::ERR_TOO_MANY_REDIRECTS Getting this before even typing anything in workspace.

    Posted March 21, 2015 10:51am by Jon Hampson
    Jon Hampson
    10,990 Points
    • CSS
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • carine todmia
    carine todmia
    6,071 Points

    i thought $(".selected") was considered improper syntax for jquery

    Posted February 28, 2015 10:56pm by carine todmia
    carine todmia
    6,071 Points
    • CSS
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

  • Ethan Neff
    Ethan Neff
    27,058 Points

    How does it know to redraw the CSS properties to the new .selected element? Does the CSS file get recalled?

    Posted October 20, 2014 2:55pm by Ethan Neff
    Ethan Neff
    27,058 Points
    • CSS
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    1 Answer

  • Sauli Laitinen
    Sauli Laitinen
    5,992 Points

    When to us $ in the beginning of a variable and when not?

    Posted August 5, 2014 5:43pm by Sauli Laitinen
    Sauli Laitinen
    5,992 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    4 Answers

  • Fatima Khan
    Fatima Khan
    1,584 Points

    not understanding the code and explanation

    Posted July 2, 2014 6:00pm by Fatima Khan
    Fatima Khan
    1,584 Points
    • HTML
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    3 Answers

  • Hossam Khalifa
    Hossam Khalifa
    17,200 Points

    don't understand this cache color line

    Posted June 23, 2014 11:12am by Hossam Khalifa
    Hossam Khalifa
    17,200 Points
    • JavaScript
    • jQuery Basics (2014)
    • Creating a Simple Drawing Application
    • Perform: Part 1

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.