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

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -