Your SlideShare is downloading. ×
2011-07-15 チューニングが楽になる JavaScript 道具箱
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

2011-07-15 チューニングが楽になる JavaScript 道具箱

6,572
views

Published on

Published in: Technology

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,572
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
24
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. JavaScript2011-07-15 CA × pixiv 1
  • 2. 2
  • 3. 3
  • 4. 4
  • 5. pixiv.lazyImage 5
  • 6. 6
  • 7. <img class="ui-lazy-image" src="transparent.png" data-src="image.png"> 7
  • 8. 8
  • 9. pixiv.throttle 9
  • 10. 10
  • 11. $(window).scroll($.proxy(this.onscroll, this));!$(window).scroll(pixiv.throttle(this.onscroll, this)); 11
  • 12. 12
  • 13. pixiv.api.request $.ajax + Storage API 13
  • 14. 14
  • 15. pixiv.api.get(/api/foo, queries);// sessionStoragepixiv.api.get(/api/foo, queries, {cache: true});// localStoragepixiv.api.get(/api/foo, queries, {cache: +new Date + 604800000}); // 1w// Objectpixiv.api.get(/api/foo, queries, {cache: pixiv.foo.data}); 15
  • 16. // jQuery Deferredpixiv.api.get(/api/foo, queries, {cache: true}) .done(function(data) { ... }) .fail(function(e) { ... }); 16
  • 17. 17
  • 18. 18
  • 19. 19
  • 20. p(ixi)v < 20