javascript - Disable and Refresh within same function jQuery UI -
this isn't of problem i'm wondering if theres way can turn this
$(".selector").sortable("disable").sortable("refresh");
into this
$(".selector").sortable("disable", "refresh");
using disable , refresh within same sortable function seems more efficient/simple.
i have no idea if can sortable api, if can't can add functionality youself using prototype
:
$.prototype.sortabledisableandrefresh = function() { this.sortable("disable").sortable("refresh"); } $(".selector").sortabledisableandrefresh();
i'm not sure kind of efficiency after. if want run faster, won't help. if want make 1 function call make code pretty, might.
Comments
Post a Comment