View Single Post
Old 11-24-2012, 02:13 PM   PM User | #15
jswannabe
New Coder

 
Join Date: Nov 2012
Location: Canada
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
jswannabe is an unknown quantity at this point
? :

Javascript ? question mark : colon
I finally found some information. It IS a condensed way to make an if else statement! Here's the link to the tutorial: http://javascript.about.com/library/bltut04.htm
Basically the question mark is the 'if' and the colon is the 'else'.
So box.checked?"block":"none" means if the box is checked change the CSS style to block, else or otherwise change the CSS style to none.

.checked is an actual javascript command.
the (box) thing still seems totally random but I'll keep looking.

Last edited by jswannabe; 11-24-2012 at 02:14 PM.. Reason: I wanted to edit the title but couldn't so I added it to the post to make it more searchable for others.
jswannabe is offline   Reply With Quote