Click here to Skip to main content
15,886,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to add tags dynamically into a asp textbox on click of "linkview" button?

JQuery Code :
Java
$(document).ready(function () {
   var elt = $('#<%=txtModules.ClientID %>');
      elt.tagsinput({
         itemValue: 'value',
         itemText: 'text'
      });
   elt.tagsinput('add', { "value": 1, "text": "Amsterdam" });
  });

This code works fine in $(document).ready() function. When I tried to write same code in following function it would not worked :
Java
$('[id*=linkView]').live("click", function () {
// same code
//retrieving data dynamically using Ajax
}
Posted
Updated 28-Aug-14 1:15am
v6
Comments
Nathan Minier 29-Aug-14 10:08am    
You are aware that .live is deprecated, correct?

Try using .on('click', function(){ }); instead.

http://api.jquery.com/live/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900