append a specific line from a file to a list element with jquery

ElGrande

New Member
first sorry bad englishi retrieve from a db some values and save them in a file. i have a list with an id in every li element. When i click an element i want to append the line from the file which is equal with the id i just clickedexample i have :\[code\] <li id="test1">just test </li>\[/code\]there is a test1 value in a line at the file...i want it to append the value of it when i click it.\[code\]$(document).ready(function() { $.get("serverResource", function(data){ $('#test1').click(function() { $('#test1').append(data); });\[/code\]the problem is the "data" has all the file data and not just a line..how i can get a line from the file and then check the value with the id and if its true append itthx
 
Back
Top