dawanda/widget-v2 — pull request #4 by jhilden (2013-07-08 09:09:42+00:00)
Title: Allow widget to be inserted into custom container and make images responsive (based on container width)

Since all of our javascript is loaded in one file at the end of the `

` for performance reasons, we needed a way to insert the widget from within that file. For that we included the dawanda scripts and put an empty `#dawanda-widget` div at the position in the HTML where we want the widget to appear.

Then we initialize the widget with this code (coffeescript):

dawandaWidget = new DaWanda.Widget
containerElement: "#dawanda-widget"

Because none of the default image size options fit into our design, I also created an option to make these widths responsive based on the width of the container.