开发者

Rails/Ajax: Unable to remove "bullet mark" when using Ajax in Rails to add Todos remotely

I managed to get 开发者_StackOverflowAjax working in Rails, specifically using remote_form_for tag to add Todos from Index. However when I do add them, there is a bullet mark next to them.

Here's my post/index

<% form_remote_tag(   :url =>
todos_path, :method => :create,  
:update => "todo_list", :position =>
:top,   :html => {:id => 'todo_form'})
do %>

<label for="todo_title">Todo</label>
<%= text_field( "todo", "title") %>

<button type="submit">Add
Todo</button> <% end %> </div> <div
id="todo_list"></div> <br />

And my partial _todo

<li id="todo_"><%= link_to todo.title, :action => 'show'%></li>

When I click Add, it adds a new todo with a bullet mark next to it.

Any help?


I know neither ruby nor rails, but to get rid of unwanted bullet points in lis you use the following CSS:

ul
{
  list-style-type: none;
  margin: 0px;
  padding: 0px;
 }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜