-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
212 lines (160 loc) · 6.99 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<meta name="description" content="Free jQuery Tagging plugin prettyTag that let's you create dynamic colorful cloud tags both in tags input and tags display mode." />
<title> jQuery Auto Colorful Tags with prettyTag Plugin </title>
<!--jQuery-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--prettyTag JS-->
<script src="js/jquery.prettytag.js"></script>
<!--prettyTag CSS-->
<link rel="stylesheet" href="css/prettytag.css" />
<script>
$(document).ready(function(){
$(".cloud-tags").prettyTag();
$(".tags").prettyTag({
randomColor: true,
tagicon: false,
});
}); //jQuery
</script>
</head>
<body>
<!--Demo and Using Guide-->
<header class="intro">
<h1> jQuery Auto Colorful Tags with prettyTag Plugin </h1>
<p> prettyTag let's you create dynamic colorful cloud tags both in tags input and tags display mode.
<br />
<br />
<b> Written in:</b><i> HTML, CSS and JavaScript</i><br>
<b> Framework: </b> <i> jQuery 3.3.1 - Font Awesome (Optional)</i>
</p>
<div class="action">
<a class="btn github" href="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/CodeHimBlog/jquery.prettytag"> Fork on GiHub </a>
<a class="btn down" href="https://github.com/CodeHimBlog/jquery.prettytag/archive/master.zip">Download </a>
<div style="margin-left: auto; margin-right: auto">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- textAd -->
<ins class="adsbygoogle"
style="display:inline-block;width:320px;height:100px"
data-ad-client="ca-pub-5750060815915776"
data-ad-slot="8115428124"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</header>
<main>
<article>
<!--prettyTag Demo-->
<h2>Colorful Cloud Tags Example</h2>
<p>The Following example illustrates prettyTag auto colored tags (display mode) to show colorful tags to visitors. </p>
<ul class="cloud-tags">
<li><a href="#2"> Web Design </a> </li>
<li> <a href="#2"> CSS Tutorial </a> </li>
<li> <a href="#2"> jQueryScript.net</a> </li>
<li> <a href="#2"> Codehim.com </a> </li>
<li> <a href="#2"> jQuery </a></li>
<li> <a href="#2"> Cloud Tags</a></li>
<li> <a href="#2"> Easy Learning </a></li>
<li> <a href="#2"> CSS3</a></li>
<li> <a href="#2"> Tagging </a></li>
<li> <a href="#2"> jQuery Plugin </a></li>
<li> <a href="#2"> HTML5 </a></li>
<li> <a href="#2"> CSS3 </a></li>
</ul>
<!--prettyTag Input Mode-->
<h2> Tags Input Mode </h2>
<p>The Following example illustrates prettyTag auto colored tags (input mode) when user creates new tags.</p>
<p><b> Enter tag name and separate with comma.</b> </p>
<input class="codehim-input-tags" name="tags" type="text" />
<section class="show-input-tags">
<ul class="tags cloud-tags"></ul>
</section>
<h2>prettyTag Main Features</h2>
<ul>
<li>Lightweight File Size.</li>
<li>Can be Handle a Large Number of Tags to Set Automatically Color. </li>
<li>Attractive Collection of Colors.</li>
<li>Option to Randomly Color Each Tag. </li>
<li>Provide way to add new tags, input tags append and store in a array with its link.</li>
<li>Easy to use and implement.</li>
</ul>
<h2> How to Use</h2>
<p>1. Load the jQuery JavaScript library, prettyTag JS & CSS file into HTML document.</p>
<pre class="prettyprint lang-html">
<!--jQuery-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--prettyTag JS-->
<script src="js/jquery.prettytag.js"></script>
<!--prettyTag CSS-->
<link rel="stylesheet" href="css/prertytag.css" />
</pre>
<p>2. Create an unordered list of tags with their links in HTML, with the following mentioned class.</p>
<pre class="prettyprint lang-html">
<ul class="cloud-tags">
<li> <a href="#tag_link"> Tag name </a> </li>
<li> <a href="#tag_link"> Tag name two </a> </li>
<li> <a href="#tag_link"> jQueryScript.net</a> </li>
<li> <a href="#tag_link"> Codehim.com </a> </li>
</ul>
</pre>
<div style="margin: 10px; margin-top: -15px; position:relative>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-5750060815915776"
data-ad-slot="7782420780"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<p> 3. And finally call the <code> prettyTag()</code> with class name <code>cloud-tags</code> in document ready function. </p>
<pre class="prettyprint lang-jd">
$(document).ready(function(){
$(".cloud-tags").prettyTag();
});
</pre>
<h3> prettyTag Input Tags </h3>
<p>To build input tags mode, create a input element in HTML document with the following mentioned classes and other necessary elements. </p>
<pre class="prettyprint lang-html">
<input class="codehim-input-tags" name="tags" type="text" />
<section class="show-input-tags">
<ul class="tags cloud-tags"></ul>
</section>
</pre>
<h2> prettyTag Plugin Options </h2>
<p>There are three options available to customize the working of this plugin. </p>
<pre class="prettyprint lang-js">
randomColor: true, //false to off random color
tagicon: true, //false to turn off tags icon
tagURL: "#", //url that will be assigned to new tags when user enter a tag name
</pre>
<p> To turn off random color and font awesome tag icon update these value.</p>
<pre class="prettyprint lang-jd">
$(document).ready(function(){
$(".cloud-tags").prettyTag({
randomColor: false,
tagicon: false,
});
});
</pre>
<p> The third option is only for tags input mode. When new tags added, this option will assign a url parameter to tag name. </p>
<p><b>Tip: </b> You can use <code> ?tag=</code> or your custom url parameter in this option. </p>
<p>The value of each new Tag Name and it's generated URL stored in a array named <code> tagsManager</code>. You can further use this array to submit tags etc.</p>
</article>
</main>
<!--Demo ONLY FILES-->
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link rel="stylesheet" href="docs/demo-only.css" />
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"> </script>
<footer class="credit">
Coded with <span title="Coffee"></span> by Asif Mughal © 2018 - <a href="https://www.codehim.com" rel="dofollow" title="Awesome Web Projects and Tutorials" target="_blank"> Codehim.com </a>
</footer>
</body>
</html>