Answer: Blue... no, YELLOOOOOOOW!
case
like if else without all the if/else
case
when then
when then
else
end
end
- http://guides.rubyonrails.org/routing.html
- http://www.amazon.com/Manga-Guide-Databases-Mana-Takahashi/dp/1593271905
- http://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/Co...
- https://developer.apple.com/library/ios/DOCUMENTATION/AppleApplications/Reference/SafariWebContent/U...
- http://cloud.avandamiri.com/01431Q0N0g03
- http://blog.forecast.io/its-not-a-web-app-its-an-app-you-install-from-the-web/
- deconstruct a program and turn it into steps-comment out in the editor
- start with the most simple step
- test small things in the console to reaffirm basic assumptions (do my expectations meet my results?)
- DIVIDE AND CONQUER
##jQuery
- div divides blocks
- span divides in-line text
- grabs something on the page and can see the value
Task | Code |
---|---|
Change the background color of '#target' by script. | $('#target').css('background', 'blue'); |
Change the text in the span, a child of '#target' | $('#target span').text('foo:bar'); |
Create a clone of the span in '#target' and position it under the orgin. | $('#target span').clone().insertAfter('#target span'); |
Change background color of the second of three '.target'. | $('.target').eq(1).css('background', 'blue'); |
Disable the button | $('.target button').attr('disabled', 'disabled'); |
Uncheck the boxes | $('.target input').removeAttr('checked'); |
Move '#child' from '#parent1' to '#parent2' | $('#child').appendTo('#parent2'); |
Make the textbox in '#target' read-only | $('#target input').attr('readonly', 'readonly') |
####Methods to Know
- .each
- .map
- .inject
- .reject
- .length
- .reverse
- .push
- .pop
- .shift
Don't use as a function name
- alias
- break
- def
- else
- ensure
- if
- next
- retry