Help understanding jQuery button enable/disable code

后端 未结 7 893
孤独总比滥情好
孤独总比滥情好 2020-12-19 19:21

I grabbed this code form JCarousel and just trying to understand these lines below. I\'m new to jQuery and not that great at JavaScript so I am not sure what is jQuery and

7条回答
  •  爱一瞬间的悲伤
    2020-12-19 19:46

    Ok guys, I'd like to bring my share to this topic, and tell you about the easiest way to disable clicked dialog button. Here goes:

    $("#dialog-selector").dialog({
        title: "Dialog",
        // Other options
        buttons: {
            "Ок": function(e) {
                $(e.currentTarget).attr("disabled", true);
            }
        }
    });

提交回复
热议问题