Skip to content

Commit

Permalink
Merge branch 'qq286735628-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucknerjb committed Mar 8, 2015
2 parents 1221c0b + dde6653 commit 4c45439
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 90 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ option to false.
'onAddTag':callback_function,
'onRemoveTag':callback_function,
'onChange' : callback_function,
'delimiter': [',',';'],
'removeWithBackspace' : true,
'minChars' : 0,
'maxChars' : 0 //if not provided there is no limit,
Expand Down
28 changes: 14 additions & 14 deletions example.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@

<link rel="stylesheet" type="text/css" href="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.css" />
<link rel="stylesheet" type="text/css" href="./jquery.tagsinput.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.js"></script>
<script type="text/javascript" src="./jquery.tagsinput.js"></script>
<!-- To test using the original jQuery.autocomplete, uncomment the following -->
<!--
<script type='text/javascript' src='http://xoxco.com/x/tagsinput/jquery-autocomplete/jquery.autocomplete.min.js'></script>
<link rel="stylesheet" type="text/css" href="http://xoxco.com/x/tagsinput/jquery-autocomplete/jquery.autocomplete.css" />
-->
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js'></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/start/jquery-ui.css" />


<script type="text/javascript">

function onAddTag(tag) {
alert("Added a tag: " + tag);
}
function onRemoveTag(tag) {
alert("Removed a tag: " + tag);
}

function onChangeTag(input,tag) {
alert("Changed a tag: " + tag);
}

$(function() {

$('#tags_1').tagsInput({width:'auto'});
Expand All @@ -45,24 +45,24 @@
//autocomplete_url:'test/fake_plaintext_endpoint.html' //jquery.autocomplete (not jquery ui)
autocomplete_url:'test/fake_json_endpoint.html' // jquery ui autocomplete requires a json endpoint
});


// Uncomment this line to see the callback functions in action
// $('input.tags').tagsInput({onAddTag:onAddTag,onRemoveTag:onRemoveTag,onChange: onChangeTag});
// $('input.tags').tagsInput({onAddTag:onAddTag,onRemoveTag:onRemoveTag,onChange: onChangeTag});

// Uncomment this line to see an input with no interface for adding new tags.
// $('input.tags').tagsInput({interactive:false});
});

</script>
<form>
<p><label>Defaults:</label>
<input id="tags_1" type="text" class="tags" value="foo,bar,baz,roffle" /></p>

<p><label>Technologies: (Programming languages in yellow)</label>
<input id="tags_2" type="text" class="tags" value="php,ios,javascript,ruby,android,kindle" /></p>

<p><label>Autocomplete:</label>
<input id='tags_3' type='text' class='tags'></p>
</form>

</form>
Loading

0 comments on commit 4c45439

Please sign in to comment.