-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWrapperComponent.vue
56 lines (50 loc) · 1.99 KB
/
WrapperComponent.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
<div>
<!-- Data targets for content load -->
<div id="pjax-container">DEFAULT TARGET</div>
<div id="testTarget">TEST TARGET</div>
<!-- Trigger for PJAX behaviour -->
<a href="/test" class="pjax">Click to load content</a>
<!-- Demo disabling PJAX calls with a class attribute -->
<a href="/no-pjax" class="no-pjax">Click to load without PJAX</a>
<!-- Demo disabling PJAX calls with a data attribute -->
<a href="/no-pjax" class="no-pjax-with-dataprop" data-no-pjax>Click to load without PJAX</a>
<!-- Demo disabling PJAX calls globally at depth with a class attribute -->
<div class="no-pjax">
<ul>
<li><a class="no-pjax-at-depth-1" href="/no-pjax">No PJAX at depth</a></li>
<li><a class="no-pjax-at-depth-2" href="/no-pjax">No PJAX at depth</a></li>
</ul>
<article>
<section>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
<a class="no-pjax-at-depth-3" href="/no-pjax">No PJAX at depth</a>
</p>
</section>
</article>
</div>
<!-- Demo disabling PJAX calls globally at depth with a data attribute -->
<div data-no-pjax>
<ul>
<li><a class="no-pjax-at-depth-4" href="/no-pjax">No PJAX at depth</a></li>
<li><a class="no-pjax-at-depth-5" href="/no-pjax">No PJAX at depth</a></li>
</ul>
<article>
<section>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
<a class="no-pjax-at-depth-6" href="/no-pjax">No PJAX at depth</a>
</p>
</section>
</article>
</div>
</div>
</template>
<script>
export default {
data() {
return {}
},
}
</script>