Package Exports
- @itrocks/xtarget
- @itrocks/xtarget/xtarget.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@itrocks/xtarget) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
xtarget
Allows you to choose any element in your DOM as a target for your anchors and forms.
Installation
npm i @itrocks/build @itrocks/xtarget
Usage
Include this ESM script into your web page, then specify the target DOM element id into your HTML code:
<script type="module">
import buildXTarget from '@itrocks/xtarget/build.js'
buildXTarget()
</script>
<a href="content-to-load.html" target="#here">Load HTML content</a>
<div id="here">Content will be loaded here</div>