Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JavaScript Tools and Frameworks Faves

JavaScript Tools and Frameworks Faves

Avatar for Anna Filina

Anna Filina

August 14, 2012
Tweet

More Decks by Anna Filina

Other Decks in Programming

Transcript

  1. FooLab Anna Filina 2 • PHP Quebec - user group

    • ConFoo - non for profit Web conference • FooLab Inc. - IT consulting • I write code, coach programmers and solve problems.
  2. FooLab Content • jQuery and jQuery UI • Image cycle,

    popup and table sorter plugins • Benchmark.js • Highcharts • Plupload • 9 examples 3
  3. FooLab $(".btnVote").click(onVoteClick); function onVoteClick() { var votes = plus +

    minus; var minusWidth = Math.floor(minus/votes*100); $(".minus").css("width", minusWidth + "%"); $(".votes").html(votes); ... } 7
  4. FooLab var status = $('<span class="status">'+value+'</span>'); $("body").append(status); status.css({ "top": btn.offset().top,

    "left": btn.offset().left }).animate({ "top": "-=30", "opacity": 0 }, 600, "linear", onStatusComplete); function onStatusComplete() { status.remove(); } 8 +1 +1
  5. FooLab Why jQuery • Easy to learn and to use

    • Fast and lightweight • Well documented • Complete and extensible • Big community 9
  6. FooLab Code: Image Cycle 12 <div id="cycle"> <img src="img/image1.jpg" />

    <img src="img/image2.jpg" /> </div> <div id="cycle-navigation"></div> $("#cycle").cycle({ fx: "scrollLeft", speed: 500, timeout: 2000, pager: "#cycle-navigation" });
  7. FooLab Code: Table Sorter 16 <table class="sortable"> <thead> <tr> <th>Country

    (airport)</th> <th>Speakers</th> <th>Fare</th> </tr> </thead> <tbody>...</tbody> </table> $("table.sortable").tablesorter();
  8. FooLab Why jQuery Plugins • Most plugins are easy to

    use • Over 5,000 plugins • Speed up your development • Download JS, include and call function 17
  9. FooLab Code: Tabs 20 <div id="tabs"> <ul> <li><a href="#tickets">Tickets</a></li> <li><a

    href="#new">New</a></li> </ul> <div id="tickets">...</div> <div id="new">...</div> </div> $("#tabs").tabs();
  10. FooLab Code: Tabs 21 <li><a href="page.html">My tickets</a></li> $tabs.tabs("add", "#tab-1", "Title");

    $tabs.find(".ui-tabs-nav").sortable({ axis: "x" }); cookie: { expires: 7 }
  11. FooLab Features: Date 24 { dateFormat: "d M, y", minDate:

    -20, maxDate: "+1M", numberOfMonths: 2, showAnim: "slide" }
  12. FooLab Why jQuery UI • Better support than 3rd party

    plugins • Complex widgets made easy • Well documented • Themes 25
  13. FooLab Code: Highcharts 33 <div id="chart"></div> new Highcharts.Chart({ chart: {

    renderTo: "chart" }, xAxis: { categories: data } });
  14. FooLab Features: Highcharts 34 tooltip: formatter: function() { return "<b>"

    + this.point.name + "</b>"; }, plotOptions...select: { radius: 6, fillColor: "#da7700" }
  15. FooLab Why Highcharts • Works with jQuery, MooTools or Prototype

    framework • Well documented • Highly customizable • Can spice up any application with charts 36
  16. FooLab Code: Plupload 39 <div id="uploader"> You browser doesn't support

    HTML5, Silverlight or Flash. </div> $("#uploader").plupload({ runtimes: "html5,silverlight,flash", url: "upload.php", rename: true, max_file_count: 20 }
  17. FooLab Why Plupload • Customizable • HTML4 , HTML5, Silverlight,

    Flash, Gears, BrowserPlus • Upload multiple files • Queue widget with upload progress • Optional integration with jQuery UI 40
  18. FooLab @afilina • jQuery: http://jquery.com/ • jQuery Cycle: http://malsup.com/jquery/cycle/ •

    NyroModal: http://nyromodal.nyrodev.com/ • tablesorter: http://tablesorter.com/docs/ • Benchmark.js: http://benchmarkjs.com/ • Highcharts: http://highcharts.com/ • Plupload: http://plupload.com/ • Code on GitHub: https://github.com/afilina/demo_jsfaves 42