jquery-template icon indicating copy to clipboard operation
jquery-template copied to clipboard

Template Replace Option

Open shellster opened this issue 11 years ago • 1 comments
trafficstars

I would love to see an enhancement which would allow the replacement of an existing element with the new template. I envision it working like so:

DOM BEFORE: <div id="d1"></div> <div id="d2"></div> <div id="d3"></div>

<script> $('#d2').loadTemplate('#whatevertemplate', {text: "hello"}, {replace: true}); </script>

DOM AFTER: <div id="d1"></div> <div id="whatever">hello</div> <div id="d3"></div>

shellster avatar Mar 05 '14 15:03 shellster

This doesn't seem to hard, so again, don't see why this couldn't be added

codepb avatar Mar 21 '14 09:03 codepb