So far, I can only attach it to body
by default, or if I specify div
, the famous-dom-renderer
is attached to the first div it finds. How can I set the selector according to class, or id?
var scene = FamousEngine.createScene('the div I am targeting');
Any
DOM
selector(string)
value can be passed to theFamousEngine.createScene
method.var scene = FamousEngine.createScene('body');
If no argument is passed to the
FamousEngine.createScene
method, then it will default to thebody
DOM
element (same as above).var scene = FamousEngine.createScene();
Using the following HTML, any of the following would be valid.
Use the snippet below to test the above code.