shanish
shanish

Reputation: 1984

autocomplete selected items into div tag

am binding the selected records of autocomplete box into div as

var data = "<div class='close'><table><tr><td rowspan='4' width='50px;'><img src='" + studentItem.Photo + "' Width='48' Height='48'  /></td><td>" + studentItem.Name + " ( <span class='stuId'>" + studentItem.StudentId + "</span> )</td><td align='right' ><div id='close' class='close16'/></td></tr><tr><td><table cellpadding='0' cellspacing='0'><tr><td>" + studentItem.Email + "</td><td>&nbsp;|&nbsp;</td><td>" + studentItem.Mobile + "</td></tr></table></td></tr></table></td></tr></table></div>";
            $('#students').css('background-color', '#FFAA55');
            $("#students").append(data);

and its binding the datas as

enter image description here

I want the each record should be in a seperate box, for example look at tag box in our stackoverflow

enter image description here

i want the result should be like this above.......I even tried to include the div script into a table, but it displays the single record in a whole row, and for the second record it comes to the second row, how can I fix this, can anyone help me

Upvotes: 1

Views: 200

Answers (1)

rkw
rkw

Reputation: 7297

What you are looking for is a css property update:

Set the divs to display: inline-block

Upvotes: 1

Related Questions