just do it with jquery

36

Upload: selfteachme

Post on 08-Jan-2017

32 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Just Do it with jQuery
Page 2: Just Do it with jQuery
Page 3: Just Do it with jQuery

jQueryWhat is

?

Page 4: Just Do it with jQuery
Page 5: Just Do it with jQuery
Page 6: Just Do it with jQuery

Including itO N A P A G E

Page 7: Just Do it with jQuery
Page 8: Just Do it with jQuery
Page 9: Just Do it with jQuery
Page 10: Just Do it with jQuery
Page 11: Just Do it with jQuery
Page 12: Just Do it with jQuery
Page 13: Just Do it with jQuery

CDNContent Delivery Network

Page 14: Just Do it with jQuery
Page 15: Just Do it with jQuery
Page 16: Just Do it with jQuery
Page 17: Just Do it with jQuery

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

ABOVE THE </BODY>

YOUR SCRIPTS

<script src=“js/production.js”></script>

</body>

A L L S C R I P T S S H O U L D B E L O A D E D L A S T

Page 18: Just Do it with jQuery
Page 19: Just Do it with jQuery

Edge CasesCaveats& S O M E T I M E S I T H A S

T O G O I N T H E < H E A D ><script src=“js/production.js” defer=“defer”></script>

S O M E L I B R A R I E S M U S T B E L O A D E D B E F O R E T H E D O M O R C S S

Page 20: Just Do it with jQuery
Page 21: Just Do it with jQuery

DOMW H A T I S T H E

?Document Object Model

Page 22: Just Do it with jQuery
Page 23: Just Do it with jQuery
Page 24: Just Do it with jQuery

D O C U M E N T

H T M L

R O O T E L E M E N T

E L E M E N T

E L E M E N T T E X T

T E X T

T E X T

A T T R I B U T E

E L E M E N T

E L E M E N T

E L E M E N T

< H E A D >

< T I T L E > " M Y H E A D I N G ”

" M Y H E A D I N G ”

" C L I C K H E R E ”

H R E F

< H 1 >

< A >

< B O D Y >

Page 25: Just Do it with jQuery

Ready?$(‘document’).ready(function() {

// code goes here});

Page 26: Just Do it with jQuery

Selecting&Doing

Page 27: Just Do it with jQuery

$(‘.item’).hide();

SELECT DO

JQUERY jQuery(‘.item’).hide();

Page 28: Just Do it with jQuery

$(‘document’).ready(function() {// code goes here

});

JQUERY SELECT DO

Page 29: Just Do it with jQuery

SliderB U I L D I N G A

Page 30: Just Do it with jQuery

ProgrammerT H I N K L I K E A

1234

When the user clicks on the next button, go to the next slide.

When the user clicks on the previous button, go to the previous slide.

When the user is on the last slide and clicks on the next button, automatically go back to the beginning.

When the user is on the first slide and clicks on the previous button, automatically go to the end.

Page 31: Just Do it with jQuery

ProgrammerT H I N K L I K E A

567

Wait 3 seconds and automatically show the next slide.

When the user hovers over the rotator, pause it.

When the user mouses off the rotator, unpause it.

Page 32: Just Do it with jQuery
Page 33: Just Do it with jQuery

HeaderA N I M A T I N G A

O N S C R O L L

Page 34: Just Do it with jQuery
Page 35: Just Do it with jQuery

MobileC R E A T I N G

N A V I G A T I O N

Page 36: Just Do it with jQuery