PDA

View Full Version : Template or create elements on DOM



dersgniw
9 Mar 2015, 6:28 AM
I asked something similar, but got no answers. I'm trying to extend a component... it's already rendered as an input so I have onRender code where I need to put a bunch of divs around it and the outer div should have a label as a child. I would think I could use a template, but how to efficiently place that existing input into the middle of it all.


<div class='a'>
<div class='b'>
<span>
<input type="checkbox"/ class='createdByExt' >
</span>
</div>
<label class="d">label</label>
</div>


I'm sure there are other ways, but I'm mostly curious about how this could be done.

http://www.sencha.com/forum/showthread.php?298829-Extending-checkbox-multiple-dom-nodes.-Is-there-a-better-way-to-write