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.
-
Pull Data from a Q4 API
Sample AJAX request for press releases
To see other APIs: Q4 Web API Docs
-
Render the
Headline
of each item pulled with mustachejs -
Create a
beforeRender
option (Use the _trigger method shown in_destroy
) HINT -> Check the scope ofthis
in the ajax's.done
-
Prepend "HEADLINE: " to all headlines with your
beforeRender
methodEx. "Cat Stuck on Bookshelf" to "HEADLINE: Cat Stuck on Bookshelf"
HINT -> You'll need three parameters for your _trigger method
-
Add a
limit
option where you can pass a number, "x", to limit items rendered to "x" items -
Allow user to toggle between showing the
limit
items and all items by pressing the#clickMeButton
button
Styling is not expected.