Skip to content

data include replace

Marcos Cáceres edited this page Jun 28, 2016 · 6 revisions

By default inclusion happens by placing the content inside the including element. At times, you will actually want the element to be replaced by the inclusion. If so, simply set this attribute to any truthy value.

Example

Pretending that "section.frag" is a <section> element, the <div> below would be replaced with a <section>.

<div 
  data-include="section.frag"
  data-include-replace=true>
<!-- 
  this all gets replaced, including the
  div.
-->
</div>

Guides

Configuration options

W3C Configuration options

Linter rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

WebIDL

HTML attributes

CSS Classes

Special properties

Clone this wiki locally