-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
130 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<pre><code class="language-html"><div c-container="/example_card.html"></div></code></pre> | ||
<div c-container="./example_card.html"></div> | ||
<pre><code class="language-html"><div c-container="/example_card.html"></div></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
<pre><code class="language-html"> | ||
<div c-container="./example_card.html" | ||
c-callback="myCustomCallback"> | ||
<div c-container="./example_card.html" | ||
c-callback="myCustomCallback"> | ||
waiting callback... | ||
</div> | ||
</div> | ||
|
||
<script> | ||
<script> | ||
// example custom callback | ||
$cruCallback('myCustomCallback', (result, element) => { | ||
$cruCallback('myCustomCallback', (result, element) => { | ||
console.log(result) | ||
element.innerHTML = result | ||
}) | ||
</script> | ||
</code></pre> | ||
</script> | ||
|
||
<div c-container="./example_card.html" | ||
c-callback="myCustomCallback"> | ||
<pre><code class="language-html"><div c-container="./example_card.html" | ||
c-callback="myCustomCallback"> | ||
waiting callback... | ||
</div> | ||
</div> | ||
|
||
<script> | ||
<script> | ||
// example custom callback | ||
$cruCallback('myCustomCallback', (result, element) => { | ||
$cruCallback('myCustomCallback', (result, element) => { | ||
console.log(result) | ||
element.innerHTML = result | ||
}) | ||
</script> | ||
</script> | ||
</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
<div c-container="./example_card.html" c-target="#another-element"></div> | ||
<div id="another-element" style="color: red;"></div> | ||
|
||
<pre><code class="language-html"><div c-container="./example_card.html" c-target="#another-element"></div> | ||
<div id="another-element" style="color: red;"></div></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<div c-container="./example_card.html" c-target="#another-element"> | ||
<button c-reload>Click here to reload</button> | ||
</div> | ||
<div id="another-element"></div> | ||
<div id="another-element"></div> | ||
|
||
<pre><code class="language-html"><div c-container="./example_card.html" c-target="#another-element"> | ||
<button c-reload>Click here to reload</button> | ||
</div> | ||
<div id="another-element"></div></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
<h3>Form append</h3> | ||
<form class="c-form" action="./example_card.html" method="get" c-append="#some-list"> | ||
<form class="c-form" action="./example_card.html" method="post" c-append="#some-list"> | ||
<button>send post</button> | ||
</form> | ||
|
||
<div id="some-list"></div> | ||
|
||
<pre><code class="language-html"><h3>Form append</h3> | ||
<form class="c-form" action="./example_card.html" method="post" c-append="#some-list"> | ||
<button>send post</button> | ||
</form> | ||
|
||
<div id="some-list"></div></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<h3>Swap Element</h3> | ||
|
||
<button c-get="./example_card.html" c-swap="#form-container">swap: replace element</button> | ||
|
||
<div id="form-container"> | ||
<p>swap: replace element</p> | ||
</div> | ||
|
||
<pre><code class="language-html"><button c-get="./example_card.html" c-swap="#form-container">swap: replace element</button> | ||
|
||
<div id="form-container"> | ||
<p>swap: replace element</p> | ||
</div></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
<h1>Simple requests</h3> | ||
|
||
<button c-get="./example_card.html" c-target="#render">get /some-url</button> | ||
<button c-post="./example_card.html" c-target="#render">post /some-url</button> | ||
<button c-put="./example_card.html" c-target="#render">put /some-url</button> | ||
<button c-delete="./example_card.html" c-target="#render">delete /some-url</button> | ||
|
||
<div id="render"></div> | ||
|
||
<pre><code class="language-html"><button c-get="./example_card.html" c-target="#render">get /some-url</button> | ||
<button c-post="./example_card.html" c-target="#render">post /some-url</button> | ||
<button c-put="./example_card.html" c-target="#render">put /some-url</button> | ||
<button c-delete="./example_card.html" c-target="#render">delete /some-url</button> | ||
|
||
<div id="render"></div></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters