-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (70 loc) · 4.27 KB
/
index.html
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.jElementExpander.js"></script>
<style types="text/css">
div { background-color: Silver; }
</style>
<script type="text/javascript">
$(document).ready(function(){
$("div.expand-content").jElementExpander();
});
</script>
</head>
<body>
<h1>Demo usage scenarios</h1>
<h2>Standard usage (<H2> tag)</h2>
<div class="expand-content">
<p>This div contains several <p> elements and a H2 we want to break on.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</p>
<p>Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. </p>
<h2>Cut after this</h2>
<p>More detailed text here....</p>
</div>
<h2>Standard usage (<UL> tag)</h2>
<div class="expand-content">
<p>This div contains several <p> elements and a UL we want to break on.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</p>
<p>Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. </p>
<ul>
<li>Lorem</li>
<li>Ipsum</li>
<li>Dolor</li>
</ul>
<p>More detailed text here....</p>
</div>
<h2>When no break element is found</h2>
<div class="expand-content">
<p>This div contains several <p> elements but no break element. This plugin won't
force a read more/less link in this scenario</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</p>
<p>Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. </p>
<p>Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem.</p>
</div>
<h2>When 2 break elements are found</h2>
<div class="expand-content">
<p>This div contains several <p> elements and the two break elements. It will add the read more/less after the FIRST element.</p>
<ul>
<li>Lorem</li>
<li>Ipsum</li>
<li>Dolor</li>
</ul>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</p>
<h2>Lorem Ipsum</h2>
<p>Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. </p>
</div>
<h2>When a break is the first element</h2>
<div class="expand-content">
<h3>H3 element here</h3>
<p>This div's first element is a breakable element. jElementExpander won't break on the first element, as it would be silly to do so.</p>
<ul>
<li>Lorem</li>
<li>Ipsum</li>
<li>Dolor</li>
</ul>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</p>
<h2>Lorem Ipsum</h2>
<p>Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. </p>
</div>
</body>
</html>