documentcloud / documentcloud-pages

Responsively embed DocumentCloud pages.
https://documentcloud.github.io/documentcloud-pages/examples/
MIT License
23 stars 10 forks source link

Allow either a selector string or DOM element as container #39

Closed reefdog closed 8 years ago

reefdog commented 8 years ago

Per @ghing at the Tribune, it would be nice for the direct embed loader to take as its container option either a selector string (#foo, .foo) or an actual DOM/jQuery element. Much of the pipeline is already compatible with this (Backbone, for instance, lets you pass in a DOM element when creating the view), but some parts like pixel ping assume a selector string.

Need to:

  1. Ensure the whole pipeline works
  2. Make sure we still have an ID to use for keying the DocumentCloud.embed.views.pages object
reefdog commented 8 years ago

Psych! Already done! Just made this issue so we could track it.