When using Ruby-on-rails, I wrote some code that looks like this:
<% for i in 0..29 %>
<%= @yes_word = @moeum_set.map{|w| w.word}[j-1 - (score.sort_by(&:to_i)[j-1-i]%ten)] %>
<% end %>
This code displays 30 words (@yes_word) recursively in a line, but I want them to be shown in a parallel layout within one div (15 : 15)
For example, like this:
Apple Banana
Kiwi Grape
Mango Citrus
... ...
The above code functions with Ajax
var search_word = $('#input').val().split(" ").pop();
$.ajax({
url : '/jadu/output_merge',
data : {
word_name : search_word
},
success : function(html) {
$('#result').html(html);
}
});
And here is the HTML CODE containing the results
<div class="panel panel-default">
<div class="panel-body" id="result">
The words that were researched
</div>
</div>