ons-carousel without tags

  • The HTML in the page is being load from an external source so there is no control over its structure.

    Currently there is:

    <div class="carousel">

    Is there a way to turn it into a carousel or use the same code that powers ons-carousel?

  • Onsen UI

    @Luke-Ward you can use ons.createElement() to create the <ons-carousel> and then append it to the DOM but you need to take care of the data manually.

Log in to reply