Esküvő

jQuery Tagging Plugin

Tagit is a great jQuery tagging plugin developed by Matthew Hailwood.

Features:
- integrated with jQuery UI auto complete
- adds current input as tag if input loses focus
- easy to use and style
- accept keys are customizable
- backspace on empty input deletes previous tag

HTML

Create a unordered list with an id attribute.

<ul id="tag">
</ul>

jQuery

<script src="js/jquery.1.7.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.1.8.20.min.js" type="text/javascript"></script>
<script src="js/tagit.js" type="text/javascript"></script>
<script type="text/javascript">
 $('#tag').tagit();
</script>

CSS

<style type="text/css">
/* Autocomplete */
.ui-autocomplete {
    background: #FFF;
    position: absolute;
    cursor: default;
    margin: 0;
    padding: 0;
    border: 1px solid #E5E5E5;
    font-size: 12px;
}
.ui-autocomplete .ui-menu-item {
    padding: 0;
    margin: 0;
}
.ui-autocomplete  .ui-menu-item a {
    display: block;
    padding: 4px 6px;
    margin: 0;
    text-decoration: none;
    line-height: 12px;
    border-bottom: 1px solid #E5E5E5;
    border-top: 1px solid #FFF;
    color: #000;  
}
.ui-autocomplete .ui-menu-item a.ui-state-hover,
.ui-autocomplete .ui-menu-item a.ui-state-active {
    background-color: #E3E3E3;
    color: #555;
    border-color: #F7F7F7;
}
.ui-autocomplete-loading {
    background: white url(ui-anim_basic_16x16.gif) right center no-repeat;
}

/* Autocomplete menu */
.ui-menu {
	list-style:none;
	padding: 2px;
	margin: 0;
	display:block;
	float: left;
}
.ui-menu .ui-menu {
	margin-top: -3px;
}
.ui-menu .ui-menu-item {
	margin:0;
	padding: 0;
	zoom: 1;
	float: left;
	clear: left;
	width: 100%;
}
.ui-menu .ui-menu-item a {
	text-decoration: none;
	display: block;
	padding: .2em .4em;
	line-height: 1.5;
	zoom: 1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
	font-weight: normal;
	background: #117300;
	color: #FFF;
}

/* Tagit */
ul.tagit {
    cursor: text;
    overflow: auto;
    font-size: 14px;
    width: 100%;
    padding: 3px;
	margin: 2px 6px 16px 0;
    border: 1px solid #E5E5E5;
    background: #FFF;
    color: #555;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;		
}
ul.tagit li {
    border-radius: 5px;
    -moz-border-radius: 5px;
    display: block;
    float: left;
    margin: 2px 5px 2px 0;
    position: relative;
}
ul.tagit.ui-sortable li.tagit-choice{
    cursor: move;
}
ul.tagit.ui-sortable li.tagit-choice a.ui-icon.ui-icon-grip-dotted-vertical{
    float: left;
    width: 12px;
    margin-left: -5px;
    cursor: move;
}
ul.tagit li.tagit-choice {
	color: #FFF;
    background: #117300;
    border: 1px solid #F2F2F2;
    padding: 2px 13px 3px 6px;
}

ul.tagit li.tagit-choice.selected {
    background: #88B97F;
    border-color: #CCC;
}
ul.tagit li.tagit-choice:hover {
	color: #FFF;
    background: #88B97F;
    border-color: #CCC;
}
ul.tagit li.tagit-new {
    padding: 2px 4px 1px 0;
}
ul.tagit li.tagit-choice input {
    display: block;
    float: left;
    margin: 0 5px 0 0;
    padding-top: 2px;
    padding-bottom: 2px;
}
ul.tagit li.tagit-choice a.tagit-close {
    color: #CCC;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    outline: medium none;
    padding: 2px 0 2px 3px;
    text-decoration: none;
    position: absolute;
    display: block;
    top: 0;
    right: 3px;
}
ul.tagit li.tagit-choice a.tagit-close:hover {
    color: #F00;
}
ul.tagit div.tagit-label.hidden {
	display: none;
}
ul.tagit input.tagit-edit {
	margin: 0px 0px 0px 2px;
	border: none;
	line-height: 16px;
}
ul.tagit input[type="text"] {
    -moz-box-sizing: border-box;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: inherit !important;
    outline: none;
}
.tagit-hiddenSelect {
    display:none;
}
</style>

 

Demo »Download


Esküvő


Related articles

Vecteezy - Free Vector Art

Vecteezy - Free Vector Art

05/08/2016

If you need Free Vector Art do not hesitate: visit Vecteezy.com

Free vector icons

Free vector icons

31/01/2016

Want to have some vector icons, free? Try this nice website.

Beautiful free stock photos from StockSnap

Beautiful free stock photos from StockSnap

11/12/2015

Would you like some cool stock photos for free? Check out this article, and try this website.


1 comment

Pali Madra2013-03-12 10:34

Good posts. I was looking for the rss link to subscribe to the feed but could not find it. Maybe I'm missing the obvious

Leave a comment

We welcome any comment from you! Please keep in mind that comments are moderated and rel='nofollow' is in use. So, please do not use a domain as your name or a spammy keyword, or your comment will be deleted.

Name: *

E-mail: *

Message: *

Click on the flower *


Find us on Facebook

Tags

Esküvő

Back to Top