CMPS 2680 - Week 14 notes

Notes Home Monday Wednesday Friday

Monday

jQuery refresher

See the following for excellent tutorials on jQuery:

jQuery is a JavaScript library that aims to simplify common tasks in web programming. These include DOM operations, animations, event handling, and even AJAX. Note that this is a JavaScript library; just about anything possible in jQuery is also possible with plain old JavaScript, but the ease of use and convenient syntax can save you development time and encourage you to follow good design patterns.

Benchmarking

jQuery offers a lot of convenience, but how does it perform with the following DOM manipulations?

Benchmark 1: creating, setting, and deleting n elements

ElementsDOM (ms)jQuery (ms)

Benchmark 2: Creating elements, optimized

CountDOM (ms)jQuery (ms)

Benchmark 3: DOM.innerHTML vs. jQuery.html()

DOM element:
jQuery element:
CountDOM.innerHTML (ms)jQuery.html (ms)

Wednesday

jQuery UI examples

This is just a jQuery UI dialog demo!
This is just a jQuery modal demo! Are you sure you want to delete the page contents?
Click OK to modify the page content.

Section 1

Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.

Section 2

Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.

Section 3

Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.

  • List item one
  • List item two
  • List item three

Section 4

Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est.

Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

Friday: storefront demo

  1. Vanilla JS

  2. JS + jQuery + Bootstrap