所以基本上,我想用 Ruby on Rails 循环记录散列来填充 twitter 引导程序:
var popup = '<div id='+ key +' class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">' +
'<div class="modal-body">'+
<% v.each_with_index do |s, i| %>
<%= i %>
<% end %>
'</div>' +
'<div class="modal-footer"><button class="btn" data-dismiss="modal" aria-hidden="true">Close</button></div>' + '</div>'
$(popup).appendTo("body");
然而它只给了我第一个元素...... 0
PS日期在哈希中是100%