小编use*_*918的帖子

jquery ui timepicker onChange Event

我正在为JQuery ui timepicker插件的onchange苦苦挣扎:http://trentrichardson.com/examples/timepicker/

我使用以下代码.

$(document).ready(function ()
{
    $('#CutoffTime').timepicker({ stepMinute: 15 });
});
Run Code Online (Sandbox Code Playgroud)

//试图捕捉变化事件

$(function ()
{
    $('#CutoffTime').change(function ()
    {
        // do something heree
    });
});
Run Code Online (Sandbox Code Playgroud)

//我的HTML

<input type="text" id="CutoffTime" />
Run Code Online (Sandbox Code Playgroud)

出于某种原因,它似乎进入无限循环?有没有更好的方法来实现我所需要的?

jquery-ui jquery-ui-timepicker

4
推荐指数
1
解决办法
1万
查看次数

根据类型更改jstree节点文本颜色

我一直在搜索互联网一个年龄,但无法找到答案.我试图根据特定节点的类型更改节点文本颜色.因此,在此示例中,我想要更改数据中定义的"角色"类型的每个节点的文本颜色.

    $("#roleTree").jstree({
        json_data: {
            data: roleTreeData
        },
        "themes": {
            "theme": "default",
            "dots": true,
            "icons": false
        },
        "ui": {
            "select_limit": 1,
            "select_multiple_modifier": "none"
        },
        "types": {
            "types": {
                "AM": {
                    "hover_node": false,
                    "select_node": false
                },
                "AF": {
                    "hover_node": false,
                    "select_node": false
                },
                "Role": {
// i dont know if possible to be done here? add class?
             //   this.css("color", "red")
                    //{ font-weight:bold}
                }
            }
        },

        plugins: ["themes", "json_data", "ui", "Select", "types", "crrm"]

    }).bind("loaded.jstree", function (event, data)
    {
        $("#roleTree").jstree("open_all");
         data.inst.select_node('ul > li:first');

    }).bind("select_node.jstree", …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jstree

3
推荐指数
1
解决办法
1万
查看次数