I want to use this source code for my :
<textarea id="textarea" class="example" rows="1"></textarea>
<div style="margin-top: 20px">
<input type="text" id="tagname" placeholder="tag name" />
<button id="addtag" class="btn">Click to add tag</button>
</div>
<script type="text/javascript">
$('#textarea').textext({ plugins: 'tags' });
$('#addtag').bind('click', function(e)
{
$('#textarea').textext()[0].tags().addTags([ $('#tagname').val() ]);
$('#tagname').val('');
});
</script>
Also I have added jquery and tag script with this tags to my head :
<script charset="utf-8" type="text/javascript" src="/lib/jq.js"></script>
<script charset="utf-8" type="text/javascript" src="/lib/tagm.js"> </script>
I want to use this source code : http://textextjs.com/manual/examples/tags-adding.html
And I run on php with Localhost .
and it is not working , where is my problem ?
You need to add a reference to the TextText JS. Add this to your page: