根据数据 - '密钥'在父母分区内获取子女分组使用Javascript

时间:2017-04-19 04:54:22

标签: javascript jquery html asp.net model-view-controller

你能帮助我把孩子div放在父div中吗(revursevly) 我在html中有这段代码。

我需要根据从data-id和data-parent检索的数据将子.wrapper div放在父类中。提前谢谢!

@model IEnumerable<Tree_List.Models.H_Table>
@{
    ViewBag.Title = "Index";
}
@*<script src="~/Scripts/ListControlScript.js"></script>*@
<script src="~/Scripts/jquery-1.10.2.min.js"></script>

<div>

@foreach (var item in Model)
{
    <div id="wrapper" class="something" data-id="@item.PARENT_ID" data-parent="@item.PARENT_ID">
        <ul>
            <input type="button" class="toggler" onclick="ShowMsg()">
            <li class="roots" >
                @item.NAME
                <input class="add_btn" type="button" value="Add" />
                <input class="edit_btn" type="button" value="Edit" />
                <input class="delete_btn" type="button" value="Delete" />
            </li>
        </ul>
    </div>
}
</div>

<script>
    $(function () {

    });
    </script>

1 个答案:

答案 0 :(得分:0)

SELECT *
FROM [fh-bigquery:reddit_comments.2017_03] 
WHERE subreddit IN ('xboxone')
ORDER BY created_utc DESC, link_id DESC
LIMIT 50