0% found this document useful (0 votes)
5 views650 pages

Javascript Tohfaa

The document is an introduction to the book 'JavaScript & jQuery' by Jon Duckett, which focuses on using JavaScript to create interactive and user-friendly websites. It covers essential programming concepts, the use of jQuery for simplifying JavaScript, and provides examples of how JavaScript can modify web content in real-time. The book is designed for readers with basic knowledge of HTML and CSS, and aims to teach practical applications of JavaScript in web development.

Uploaded by

c.arlaayman77
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
5 views650 pages

Javascript Tohfaa

The document is an introduction to the book 'JavaScript & jQuery' by Jon Duckett, which focuses on using JavaScript to create interactive and user-friendly websites. It covers essential programming concepts, the use of jQuery for simplifying JavaScript, and provides examples of how JavaScript can modify web content in real-time. The book is designed for readers with basic knowledge of HTML and CSS, and aims to teach practical applications of JavaScript in web development.

Uploaded by

c.arlaayman77
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
JAVASCRIPT © & JQUERY eto Reel te} Poems ilu cus JON DUCKETT JAVASCRIPT & JQUERY Interactive Front-End Web Development JON DUCKETT Additional materia by GILLES RUPERT & JACK MOORE WILEY Mt Published by Joba Wiley & Sons ne 10475 Crosspoint Boulevard Indianapolis, IN 46256 soon [Link] ©2014 by John Wiley & Sons, ne, Indianapolis, Indiana (aN; 978-1-118-59166-8 ‘Manufactured inthe United States of America 10987654321 Nopatltnis picaton may be repre, sored na eta tn rwanda ny fr ary means leon, mecank Pototoyie cang xanga" thera, ecet eprint Secon 107 oI! he 176Ustus Stes Copy et ‘thou ee per wl person Puhr rasan vou ayes lth porn pero t o Copy Clearance Cert 22 ovens Dive, Durer MA }23 (978) 50-840 (378 66-8600 Raquela uber peso shale aaiesed te Permisions Dupre ln Wey & Ser. ee Roe Set Hebien,W) O73, (20 7a {607 fae 200 78-4008 or ones Htp// wane. cm/o/oemio Unit Ubity/Diclaer of Waray: Te abs pdb our make rorereseraens warns wh respel tote acre ‘rronpistrest ol comers ewok andspeccly cco s.r alr hat mean waar reset Spree pron Howrarymoy be etd aetna bys pramnosimatass Tha yoece ond seis conned arena ate utaelorevery tuations wok aso tthe uncrstndeg tthe pba iat engaged enn eh scouting. cher rlsiona serves. paeseal asstance rege heserdcesol compete prlesson prion sos ‘aout Nate the pbloer othe autor alt blo drapes aig heron TR lc ht ncrgoianor Web tes ‘eredo ins wre oe atatn a/b 3 oer sauce helms dest mean tha he uo ube enor \westes ian ths worky hve hanged Gsopenred betwee whens wok ws Won and Wien i538. gens rman enous products nd erics lace cntet ow Customer Cav Deparimenwihinthe Unt Sts (877) “7629976 co tha Unto Siar (317) S72 993 0c 572-4002 Wiley aes avait of pita elev ort aby pica dean Some materi ced wih standard pint esr ‘paboak oy otbecucedine oats rn pron deroné thi book lerto med suenas scD 0" OVD atishl add nthe ‘rtonyoupucaed, you ny mrad ha matra t Mo//Soksupporeycom. Fr mere nomaon tot Wey products is setey com Ua ConrssComrelNumber 2018985952 “ademas: Wer ane Wey log se adem cretred ademars foe Wy & Sons, Ine and/or fies, ne Ud Sse ante cures ray bese et writen gemson Jers sere ode of Oral ei: thr vasenae the prperty hor pete oer hn Win Sens ea esate way precutr ent mentioned TABLE OF CONTENTS eer ety Ge ECC ere ee ar aro Chapter 3: Functions, Methods & Objects ee ee ene ard ore ae eee Cr one ae rey oman ag Crewe et ere] eae Cea e ee asd Cees er are Cu ee eee ad Ore mE eee NC id oly DOWNLOAD Bae eRe or Ru eee ARIE ed X Va www. [Link] CREDITS For John Wiley & Sons, ne For Wagon Ltd. Executive Ealtor Author Carol Long Jon Duckett Project Editor co-Authors Kevin Kent Jack Moore ‘Chapters 1.612) Production Editor Daniel Scribner Giles Ruppert (Chapter 13) Editorial Manager Mary Beth Wakefield Technical Review ‘Mathias Bynens Associate Director of Marketing David Mayhew Review Team Chris Ullman Marketing Manager David Lean Lorna Min Harison Tht Jay Bursky Business Manager Richard Eskins “Amy Koies Scott Robin Stachu Korck Vice President and Executive Group Publisher Thank you Richard Swadiey ‘Annette Loudon ‘Michael Tomko Associate Publisher ‘Michael Vella Zarb Jin Minate Pam Coca Rishabh Pugalia Project Coordinator, Cover Toea Klemme ‘cover Desien Fmme Stone Design Emme Stone Jon Duckett Photography Joh Stewardson [Link] IMstration Matthew Cancich (Hotel in Chapter3) Emme tone (Teacher in Chapter 4) ‘Additional Photography Electronics in Chapters 8 & 9: ‘Aaron Nielsen Arkadiusz Jan Sikorski Matt ers Mirsad Dedovie Steve Lodetink [Link]/eredits INTRODUCTION This book explains how JavaScript can be used in browsers to make websites more interactive, interesting, and user-friendly. You will also learn about iQuery because it makes writing JavaScript a lot easier. To get te most out ofthis book, you wl need to know howto bul webpages Using HTML ‘and CSS, Beyond that, o prior experience with programming is necessary, Learning to rogram with lavaScript involves 1 2 3 Understanding some basie Learning the language tse, Gecoring fila wth how programming concepts and and ik allanguages, you its applied by looking at theterms that JavaScript need toknowits vocabulary examples of how lovaSerlot programmers useto andhow tostructure your iscommonly usedin describe them, sentences, websites today ‘The only equipment you need touse this book re a computer with s modern wab browser Install, and your favorite code editor, (eg. Notepad, TextEdit, Sublime Testor Cod). (@ erence Introduction pages come atthe beginning of ech chapter. They inlroduce the key topes ou wil learo bout Background pages appear on white. They explain the contest ofthe topics covered that are discussed Ineach chapter. Fe Example pases bring together the topics youhave learned ia that chapter ond demonstrate how they canbe applies Reference pages introduce key pleces of JavaScript HTML code is shown in bie, CSS code in pink and JavaScript green Diagram and infographics pages are shown on 8 dark background. They provide a simple, vi reference to opis discussed. Summary pages com atthe end of each chapter They remind youcfthekey topics that were covered Ineach chapter. 1 ESS CONTENT we tert inside al ofthe Pat eso) PC aes eoauc ee eee) modifying the content and Doge eae Re rc while it is being viewed in ee 2 MODIFY CONTENT You conse jmaScript to elements, atin xt tothe class new CSS rules cEMeaiag Ore eer CCCI tag ere Tee CR al REACT TO EVENTS interactive by responding y OU UL es Looe EXAMPLES OF JAVASCRIPT IN THE BROWSER Being able to change the content of an HTML page while it is loaded in the browser is very powerful. The examples below rely on the ability to: ‘Access the content of the page ‘Modify the content of the page Program rules or instructions the browser can follow React to events triggered by the user or browser SLIDESHOWS Shown in Chapter) Slideshows can display 8 number of diferent images (orother HTMIL content) within the same space ‘ona given page. They can ploy automatialy as ‘sequence, or users can click through the sides ‘manualy They allow more content tobe displayed \ithina limited amount of space, React: Script triggered when the page loads ‘Access: Get each side rom the slideshow ‘Modify: Only show the fist slide chide others) Program: Seta timer: when to show next slide ‘Modify: Change which sides shown React: When user clicks button for cillerent slide rogram: Determine which side to show ‘Modify: Show the requested side © mrnooverion FORMS Shown in Chapter 13 Validating forms checking whether they have been filled in corect) important when information is supplied by users. avaSerpt ets you alert the user if mistakes have been made lt can also perform sophisticated calculations based on any data entered ‘and reveal the results tothe use React: User presses the submit button when they have entered teirname ‘Access: Get value from form Held Program: Check thatthe name long enaugh Medify: Show s warsing message ifthe name is not long enough ‘The examples on these two pages sive youa taste of what JavaScript can dowithin a web page, and ofthe techniques you willbe learning throughout this book. RELOAD PART OF PAGE Showin Chapter 8 ‘You might nat want to force vistors to reload the content ofan entire web page, particularly if you only need to refresh a ema portion of page Just reloading a section ofthe page can make a site fe! ike tis aster to load and more ike an application React: Script triggered when user clicks on nk ‘Access: Thelin tot they clicked on Program: Load the new content that was requestes from that ink ‘Access Find the elament toreplce inthe page ‘Modify: Replace tat content with the new content Inthe coming chapters. you wil learn how and when to accessor modily content, ad programming rues, and react to events ea BS i. i eal FILTERING DATA Shown in Chapter 12 HH youhave 2 lt of information to display on 3 page, you an help uses find information they need by Providing fiers. Here buttons are generated using fata inthe attributes ofthe HTML elements. ‘When the user clicks on one ofthe butions, they are only shown the images with that keyword. React: Serio triggered when page loads Program: Collect keywords trom images Program: Turn the keywords nto buttons the user canclickon React: User clicks on one ofthe buttons Program: Fins the relevant subset of imoges that should be shown ‘Modify: Show the subse of images that use that tog wermosuenon (7)

You might also like