我没有动态创建的元素相同的渲染 - JQuery - Bootstrap

时间:2016-04-11 08:37:34

标签: javascript jquery twitter-bootstrap-3

我在我的网站上使用Bootstrap和Jquery,我遇到了问题。 当我动态创建元素时,我不会像我的静态'那样进行渲染。元素,这是我的html元素:

SELECT      u.id user_id,
            u.login user_login,
            COUNT(distinct e.id) events_won
FROM        events e
INNER JOIN  photos ph
        ON  ph.event_id = e.id
        AND ph.id = (
              SELECT      ph.id
              FROM        photos ph
              INNER JOIN  points p 
                       ON p.photo_id = ph.id
              WHERE       ph.event_id = e.id
              GROUP BY    ph.id
              ORDER BY    COUNT(*) DESC
              LIMIT       1
            )
INNER JOIN  users u
         ON u.id = ph.user_id
GROUP BY    u.id,
            u.login

渲染: That's the rendering

这就是渲染,当我点击添加按钮时:

New buttons added but they don't have space between them

我不知道为什么渲染是这样的,因为我在我的添加按钮监听器中放了相同的html元素:

<div class="row" style="margin-bottom: 10px;">
  <div class="col-xs-4 col-sm-2">
    <button type="button" class="action btn btn-default">
       <span class="glyphicon glyphicon-cog"></span>
    </button>
    <button type="button" class="action btn btn-default">
       <span class="glyphicon glyphicon-remove"></span>
    </button>
  </div>
</div>

由于

0 个答案:

没有答案