SlideShare a Scribd company logo
Introduction to 
Javascript and jQuery 
Kathy Zhou 
Tech Talk 
PennApps Fall 2014
Javascript 
programming language that runs in web browsers 
jQuery 
Javascript library for animations, effects, and making Javascript 
easy to use 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What this talk WON’T do: 
- make you a Javascript expert in an hour (let’s be real, guys) 
- best to take CIS 197 or read Javascript: the Good Parts 
- explain all the weird nuances of the language 
- ‘null’ vs. ‘undefined’, ‘falsey’ values, you can look up 
- teach you functional programming 
- very important, I recommend studying 
Kathy Zhou, PennApps Fall 2014 Tech Talk
actual picture of you after this talk 
I promise 
What this talk WILL do: 
- make you a happy hacker 
- this is PennApps, after all 
- teach you the process of building a UI feature on your web app 
^ most important!! 
- point you in the right direction for learning more advanced 
features of Javascript and jQuery 
Kathy Zhou, PennApps Fall 2014 Tech Talk
This talk assumes you know: 
- basic HTML + CSS 
- basic programming (CIS110 or CIS120) 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Basics of Javascript 
Kathy Zhou, PennApps Fall 2014 Tech Talk
‘running’ a Javascript program 
- a Javascript program is a script file 
- include it as a link in your HTML document, before the </body> tag 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What you can do in Javascript 
- integers, floats, strings 
- lists 
- hash tables/dictionaries 
- for-loops 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What you can do in Javascript 
- creating a function: line 21 
- calling a function: line 26 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What is the DOM? 
Kathy Zhou, PennApps Fall 2014 Tech Talk
DOM: Document Object Model 
- every web page is represented 
as a tree structure 
- the root node is the <html> 
tag 
- child nodes are the nested 
tags in the document (<body>, 
<div>, <p>, etc.) 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Javascript can manipulate the DOM 
- Javascript can dynamically 
remove or append tags 
- can modify text on the page 
Kathy Zhou, PennApps Fall 2014 Tech Talk
ex. adding an element to the page 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Event handlers 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What is an event handler? 
- the user interacts with the web page in different ways 
- clicking, typing, mouse-ing over elements, etc. 
- event handlers are functions that execute during particular user events 
on certain elements 
Kathy Zhou, PennApps Fall 2014 Tech Talk
ex. event handler for clicking on the <body> 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Basics of jQuery 
Kathy Zhou, PennApps Fall 2014 Tech Talk
linking to the jQuery script file 
- lines 30-31: the proper way to link to jQuery 
- protip: remember to include it as the first link, and then include 
other javascript files after it 
Kathy Zhou, PennApps Fall 2014 Tech Talk
most important feature of jQuery 
(to you): easier manipulation of 
Kathy Zhou, PennApps Fall 2014 Tech Talk 
the DOM
ex. creating a pointer to an element on the page 
Kathy Zhou, PennApps Fall 2014 Tech Talk 
note the CSS notation 
“.” to access classes 
“#” to access IDs
ex. creating an event handler 
Kathy Zhou, PennApps Fall 2014 Tech Talk
protip: anything you want immediately executed, wrap in the jQuery 
document-ready construct 
Kathy Zhou, PennApps Fall 2014 Tech Talk
protip: the method ensures the page loads completely before the scripts 
execute 
you can also do $(document).ready(function () {...}); 
Kathy Zhou, PennApps Fall 2014 Tech Talk
protip: don’t do 
anonymous function 
handlers! 
always name your 
functions because it’s 
better for clarity and 
debugging 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Kathy Zhou, PennApps Fall 2014 Tech Talk 
demo time!
autocomplete search bar 
Google → 
our demo → 
Kathy Zhou, PennApps Fall 2014 Tech Talk
download and extract files: 
https://github.com/KathyZ/talks/archive/master.zip 
Kathy Zhou, PennApps Fall 2014 Tech Talk
go into “pennappsf214Javascript” folder 
double-click on ‘index.html’ 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Kathy Zhou, PennApps Fall 2014 Tech Talk 
*demo-ing*
workflow: steps to a UI feature 
1. identify the user actions 
- does something happen when the user 
clicks? when the user presses the ‘enter’ button? 
2. identify what visual aspects need to be 
there 
- consider which elements are added or 
removed, how they are modified, etc 
- also consider what CSS changes need to 
be made 
3. implementation 
Kathy Zhou, PennApps Fall 2014 Tech Talk
more learning 
for PennApps weekend: 
jQuery UI: http://jqueryui.com/ 
Foundation by ZURB: http://foundation.zurb.com/ 
Mozilla’s Javascript Guide: 
https://developer.mozilla.org/en-US/docs/Web/JavaScript 
jQuery documentation: 
http://api.jquery.com/ 
Airbnb’s Javascript style guide (best practices): 
https://github.com/airbnb/javascript 
Stack Overflow 
Kathy Zhou, PennApps Fall 2014 Tech Talk
thank you and happy hacking! 
@kaffkaff ← hit me up 
Kathy Zhou, PennApps Fall 2014 Tech Talk

More Related Content

PDF
An easy guide to Plugin Development
Shinichi Nishikawa
 
PPTX
Future proofing design work with Web components
btopro
 
PDF
So, you want to be a plugin developer?
ylefebvre
 
PPTX
Web design 2 - Basic HTML 2010
Matthew Mobbs
 
PDF
Jumping Into WordPress Plugin Programming
Dougal Campbell
 
PDF
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
Jessie Evangelista
 
PDF
Wordpress Questions & Answers
Nicole Dion
 
PDF
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Jonny Allbut
 
An easy guide to Plugin Development
Shinichi Nishikawa
 
Future proofing design work with Web components
btopro
 
So, you want to be a plugin developer?
ylefebvre
 
Web design 2 - Basic HTML 2010
Matthew Mobbs
 
Jumping Into WordPress Plugin Programming
Dougal Campbell
 
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
Jessie Evangelista
 
Wordpress Questions & Answers
Nicole Dion
 
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Jonny Allbut
 

What's hot (20)

PPTX
Denver topical homepages
Christoph Trappe
 
PPTX
Leveraging Continuous Integration For Fun And Profit!
Jess Chadwick
 
PDF
WordCamp Sheffield 2014 Theme Workflow Presentation
Jonny Allbut
 
PPTX
Web Components in Action: building reusable components for web development
Manning Publications
 
PDF
Managing a Project the Drupal Way - Drupal Open Days Ireland
Emma Jane Hogbin Westby
 
PDF
Introduction to VueJS & The WordPress REST API
Caldera Labs
 
PDF
WordCamp Bournemouth 2014 - Designing with data in WordPress
Jonny Allbut
 
PDF
Theming in WordPress - Where do I Start?
Edmund Turbin
 
PDF
On Selecting JavaScript Frameworks (Women Who Code 10/15)
Zoe Landon
 
PPTX
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Rebecca Eloise Hogg
 
PDF
Getting a CLUE at the Command Line
Emma Jane Hogbin Westby
 
PDF
Web, Native iOS and Native Android with One Ember.js App
FITC
 
PPTX
What have you learnt about technologies from the
sarah123ashcroft
 
PPTX
JavaScript All The Things
Jordan Yaker
 
DOC
Evaluation of project website
ZespolSzkolZawiercie
 
PDF
Writing Software not Code with Cucumber
Ben Mabey
 
PDF
Parse Apps with Ember.js
Matthew Beale
 
PDF
JavaScript Power Tools
Codemotion
 
PPTX
Q4
nicole2095
 
PDF
Rapid WordPress theme development
Jonny Allbut
 
Denver topical homepages
Christoph Trappe
 
Leveraging Continuous Integration For Fun And Profit!
Jess Chadwick
 
WordCamp Sheffield 2014 Theme Workflow Presentation
Jonny Allbut
 
Web Components in Action: building reusable components for web development
Manning Publications
 
Managing a Project the Drupal Way - Drupal Open Days Ireland
Emma Jane Hogbin Westby
 
Introduction to VueJS & The WordPress REST API
Caldera Labs
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
Jonny Allbut
 
Theming in WordPress - Where do I Start?
Edmund Turbin
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
Zoe Landon
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Rebecca Eloise Hogg
 
Getting a CLUE at the Command Line
Emma Jane Hogbin Westby
 
Web, Native iOS and Native Android with One Ember.js App
FITC
 
What have you learnt about technologies from the
sarah123ashcroft
 
JavaScript All The Things
Jordan Yaker
 
Evaluation of project website
ZespolSzkolZawiercie
 
Writing Software not Code with Cucumber
Ben Mabey
 
Parse Apps with Ember.js
Matthew Beale
 
JavaScript Power Tools
Codemotion
 
Rapid WordPress theme development
Jonny Allbut
 
Ad

Viewers also liked (7)

PPTX
Lesson 203 18 sep13-1500-ay
Codecademy Ren
 
PPT
Cmp
Vishal Gohel
 
PPTX
Object Oriented Programming
baabtra.com - No. 1 supplier of quality freshers
 
PDF
03. oop concepts
Haresh Jaiswal
 
PPTX
Basics of Object Oriented Programming
Abhilash Nair
 
PPT
Java is an Object-Oriented Language
ale8819
 
PPTX
Introduction to Object Oriented Concepts
Mamoun Nawahdah
 
Lesson 203 18 sep13-1500-ay
Codecademy Ren
 
03. oop concepts
Haresh Jaiswal
 
Basics of Object Oriented Programming
Abhilash Nair
 
Java is an Object-Oriented Language
ale8819
 
Introduction to Object Oriented Concepts
Mamoun Nawahdah
 
Ad

Similar to Javascript and jQuery PennApps Tech Talk, Fall 2014 (20)

PDF
User Experience Bootcamp for Developers
Catherine Robson
 
ZIP
Practical Accessibility
Eli Cochran
 
PDF
Php mysql-training online-by_php2ranjan
php2ranjan
 
PDF
php training in hyderabad
php2ranjan
 
PPTX
Building Shiny Application Series - Layout and HTML
Olga Scrivner
 
PDF
Rapidly prototyping web applications using BackPress
Nathaniel Taintor
 
ODP
2014 11 20 Drupal 7 -> 8 test migratie
hcderaad
 
PDF
Full stack-web-design
Kevin Conboy
 
PDF
Introjs10.5.17SD
Thinkful
 
PPT
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
PPT
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
Tikal Knowledge
 
PPTX
End-to-end testing with geb
Jesús L. Domínguez Muriel
 
PPT
PCC2 - How do I incorporate Apple-like design into my products?
ProductCamp Chicago
 
PDF
Behaviour driven infrastructure
Lindsay Holmwood
 
PDF
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
PPT
Simple Social Networking with Ruby on Rails
jhenry
 
PPTX
Simplicity - develop modern web apps with tiny frameworks and tools
Rui Carvalho
 
PPT
Presentations4 Session9
lalapoon
 
PDF
Progressive Web Application by Citytech
Ritwik Das
 
PPTX
Driven Development - Closing the Loop on Scrum
Adam Englander
 
User Experience Bootcamp for Developers
Catherine Robson
 
Practical Accessibility
Eli Cochran
 
Php mysql-training online-by_php2ranjan
php2ranjan
 
php training in hyderabad
php2ranjan
 
Building Shiny Application Series - Layout and HTML
Olga Scrivner
 
Rapidly prototyping web applications using BackPress
Nathaniel Taintor
 
2014 11 20 Drupal 7 -> 8 test migratie
hcderaad
 
Full stack-web-design
Kevin Conboy
 
Introjs10.5.17SD
Thinkful
 
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
Tikal Knowledge
 
End-to-end testing with geb
Jesús L. Domínguez Muriel
 
PCC2 - How do I incorporate Apple-like design into my products?
ProductCamp Chicago
 
Behaviour driven infrastructure
Lindsay Holmwood
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Simple Social Networking with Ruby on Rails
jhenry
 
Simplicity - develop modern web apps with tiny frameworks and tools
Rui Carvalho
 
Presentations4 Session9
lalapoon
 
Progressive Web Application by Citytech
Ritwik Das
 
Driven Development - Closing the Loop on Scrum
Adam Englander
 

Recently uploaded (20)

PPTX
Presentation about variables and constant.pptx
kr2589474
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
DOCX
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Presentation about variables and constant.pptx
kr2589474
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
oapresentation.pptx
mehatdhavalrajubhai
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Activate_Methodology_Summary presentatio
annapureddyn
 
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 

Javascript and jQuery PennApps Tech Talk, Fall 2014

  • 1. Introduction to Javascript and jQuery Kathy Zhou Tech Talk PennApps Fall 2014
  • 2. Javascript programming language that runs in web browsers jQuery Javascript library for animations, effects, and making Javascript easy to use Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 3. What this talk WON’T do: - make you a Javascript expert in an hour (let’s be real, guys) - best to take CIS 197 or read Javascript: the Good Parts - explain all the weird nuances of the language - ‘null’ vs. ‘undefined’, ‘falsey’ values, you can look up - teach you functional programming - very important, I recommend studying Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 4. actual picture of you after this talk I promise What this talk WILL do: - make you a happy hacker - this is PennApps, after all - teach you the process of building a UI feature on your web app ^ most important!! - point you in the right direction for learning more advanced features of Javascript and jQuery Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 5. This talk assumes you know: - basic HTML + CSS - basic programming (CIS110 or CIS120) Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 6. Basics of Javascript Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 7. ‘running’ a Javascript program - a Javascript program is a script file - include it as a link in your HTML document, before the </body> tag Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 8. What you can do in Javascript - integers, floats, strings - lists - hash tables/dictionaries - for-loops Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 9. What you can do in Javascript - creating a function: line 21 - calling a function: line 26 Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 10. What is the DOM? Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 11. DOM: Document Object Model - every web page is represented as a tree structure - the root node is the <html> tag - child nodes are the nested tags in the document (<body>, <div>, <p>, etc.) Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 12. Javascript can manipulate the DOM - Javascript can dynamically remove or append tags - can modify text on the page Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 13. ex. adding an element to the page Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 14. Event handlers Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 15. What is an event handler? - the user interacts with the web page in different ways - clicking, typing, mouse-ing over elements, etc. - event handlers are functions that execute during particular user events on certain elements Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 16. ex. event handler for clicking on the <body> Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 17. Basics of jQuery Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 18. linking to the jQuery script file - lines 30-31: the proper way to link to jQuery - protip: remember to include it as the first link, and then include other javascript files after it Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 19. most important feature of jQuery (to you): easier manipulation of Kathy Zhou, PennApps Fall 2014 Tech Talk the DOM
  • 20. ex. creating a pointer to an element on the page Kathy Zhou, PennApps Fall 2014 Tech Talk note the CSS notation “.” to access classes “#” to access IDs
  • 21. ex. creating an event handler Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 22. protip: anything you want immediately executed, wrap in the jQuery document-ready construct Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 23. protip: the method ensures the page loads completely before the scripts execute you can also do $(document).ready(function () {...}); Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 24. protip: don’t do anonymous function handlers! always name your functions because it’s better for clarity and debugging Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 25. Kathy Zhou, PennApps Fall 2014 Tech Talk demo time!
  • 26. autocomplete search bar Google → our demo → Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 27. download and extract files: https://github.com/KathyZ/talks/archive/master.zip Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 28. go into “pennappsf214Javascript” folder double-click on ‘index.html’ Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 29. Kathy Zhou, PennApps Fall 2014 Tech Talk *demo-ing*
  • 30. workflow: steps to a UI feature 1. identify the user actions - does something happen when the user clicks? when the user presses the ‘enter’ button? 2. identify what visual aspects need to be there - consider which elements are added or removed, how they are modified, etc - also consider what CSS changes need to be made 3. implementation Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 31. more learning for PennApps weekend: jQuery UI: http://jqueryui.com/ Foundation by ZURB: http://foundation.zurb.com/ Mozilla’s Javascript Guide: https://developer.mozilla.org/en-US/docs/Web/JavaScript jQuery documentation: http://api.jquery.com/ Airbnb’s Javascript style guide (best practices): https://github.com/airbnb/javascript Stack Overflow Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 32. thank you and happy hacking! @kaffkaff ← hit me up Kathy Zhou, PennApps Fall 2014 Tech Talk