Skip to content

Commit

Permalink
Moved README to README.md and modified index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
dukz committed Nov 2, 2010
1 parent 832507f commit 9f804b5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
4 changes: 0 additions & 4 deletions README

This file was deleted.

22 changes: 22 additions & 0 deletions README.md
@@ -0,0 +1,22 @@
jQuery Taggable Plugin
=========================

The taggable plugin helps you create an area with a checkboxes for the tags, and will bind them to a specified text input field.

Usage
-------------------------
Create your tag field with an `input[type="text"]` or a `text_area` as well as a `div` that will contain the checkbox tags.

<input type="text" id="skills_list_field" name="skills_list" value="c#" />
<div id="skills_list_tags"></div>

Use the jQuery selector to select the tag container, and instantiate Taggable passing the field selector (preferrably ID of the input or text area), as well as an array of tags.

<script type="text/javascript">
$(document).ready(function() {
var skill_tags = ['c#', 'php', 'java', 'javascript', 'ruby'];
$('#skills_list_tags').Taggable({ field_selector: '#skills_list_field', available_tags: skill_tags });
});
</script>


8 changes: 4 additions & 4 deletions index.html
Expand Up @@ -23,7 +23,7 @@
<script type="text/javascript">
$(document).ready(function() {
var skill_tags = ['c#', 'php', 'java', 'javascript', 'ruby'];
$('#tags_taggable').Taggable({ field_selector: '#skills', available_tags: skill_tags });
$('#skills_list_tags').Taggable({ field_selector: '#skills_list_field', available_tags: skill_tags });
});
</script>
</head>
Expand All @@ -40,10 +40,10 @@ <h2>Live Example</h2>

<form>
<h3>User Skills</h3>
<label for="skills">Skill Tags</label><br />
<input type="text" id="skills" name="tags" />
<label for="skills_list_field">Skill Tags</label><br />
<input type="text" id="skills_list_field" name="skills_list" value="java" />
<div id="skills_list_tags"></div>
</form>
<div id="tags_taggable"></div>
</div>
</body>
</html>

0 comments on commit 9f804b5

Please sign in to comment.