From 26d9ad9d2074cb7cd02f0347e6bb3d731b65e637 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 29 Sep 2014 20:28:36 +0300 Subject: [PATCH] #254 preserve the attributes state (CSS, disabled, HTML5 data attributes) of on model updates --- backbone.stickit.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backbone.stickit.js b/backbone.stickit.js index 3097c9b..f4b778c 100644 --- a/backbone.stickit.js +++ b/backbone.stickit.js @@ -506,7 +506,7 @@ selectConfig = {}; var getList = function($el) { return $el.map(function() { - return {value:this.value, label:this.text}; + return {value:this.value, label:this.text, attr: Backbone.$(this).prop('attributes')}; }).get(); }; if ($el.find('optgroup').length) { @@ -536,12 +536,17 @@ _.each(optList, function(obj) { var option = Backbone.$('