Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Using control.plugin with bootstrap

$
0
0
I hope I understood your question right but I think all you have to do is
  • steal bootstrap.js
  • render the template into this.element
  • initialize the Bootstrap plugin on this.element
Something like:
  1. steal('can/control/plugin', 'lib/bootstrap.js', function(){

  2.     var MyCarousel = can.Control({
  3.         pluginName : 'myCarousel'
  4.     },{
  5.         init : function(element, options, arg1){
  6.            this.element.html(can.view('path/to/view.mustache', this.options)).carousel();
  7.         }
  8.     });

  9.  });


Viewing all articles
Browse latest Browse all 3491

Trending Articles