Skip to content

q4mobile/jQuery-widget-factory-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Widget Factory Workshop

Motivation: Familiarize devs with the underlying technology behind Q4 Widgets

Q4 widgets are currently built with jQuery's Widget Factory. To better understand this technology, you will re-implement common features found in Q4 Widgets using a starter app as an example.

To start, run npm i and then npm run start and on your browser open localhost:1234.

Tasks:

  1. Pull Data from a Q4 API

    Sample AJAX request for press releases

    To see other APIs: Q4 Web API Docs

  2. Render the Headline of each item pulled with mustachejs

  3. Create a beforeRender option (Use the _trigger method shown in _destroy) HINT -> Check the scope of this in the ajax's .done

  4. Prepend "HEADLINE: " to all headlines with your beforeRender method

    Ex. "Cat Stuck on Bookshelf" to "HEADLINE: Cat Stuck on Bookshelf"

    HINT -> You'll need three parameters for your _trigger method

  5. Add a limit option where you can pass a number, "x", to limit items rendered to "x" items

  6. Allow user to toggle between showing the limit items and all items by pressing the #clickMeButton button

Styling is not expected.

About

A workshop to introduce developers to jQuery Widget Factory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published