spec/dummy/tmp/cache/assets/development/sprockets/37921dfa12e3d26acd1391b11883b3f6 in china_city-0.0.1 vs spec/dummy/tmp/cache/assets/development/sprockets/37921dfa12e3d26acd1391b11883b3f6 in china_city-0.0.2

- old
+ new

@@ -1,41 +1,34 @@ {I" class:ETI"BundledAsset;FI"logical_path;TI"$china_city/jquery.china_city.js;FI" pathname;TI"f/Users/saberma/Documents/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;FI"content_type;TI"application/javascript;TI" -mtime;Tl+ØæRI" length;TiÔI" digest;TI"%baa881b54d5eaab4e9739ce50eb2241c;FI" source;TI"Ô(function() { +mtime;Tl+pÌRI" length;Ti÷I" digest;TI"%e64e8125b904fa89e4c96029077f1c69;FI" source;TI"÷(function() { (function($) { $.fn.china_city = function() { return this.each(function() { var selects; - console.log('0'); selects = $(this).find('.city-select'); return selects.change(function() { - var next_selects; - console.log('00'); - next_selects = selects.eq(selects.index(this) + 1); - console.log($(this).val()); - if (!$(this).val()) { - console.log('11'); - return $("option:gt(0)", next_selects).remove(); - } else if (next_selects[0]) { - console.log('22'); + var $this, next_selects; + $this = $(this); + next_selects = selects.slice(selects.index(this) + 1); + $("option:gt(0)", next_selects).remove(); + if (next_selects.first()[0] && $this.val()) { return $.get("/china_city/" + ($(this).val()), function(data) { var option, _i, _len, _results; - $("option:gt(0)", next_selects).remove(); _results = []; for (_i = 0, _len = data.length; _i < _len; _i++) { option = data[_i]; - _results.push(next_selects[0].options.add(new Option(option[0], option[1]))); + _results.push(next_selects.first()[0].options.add(new Option(option[0], option[1]))); } return _results; }); } }); }); }; return $(function() { - console.log('1111111'); return $('.city-group').china_city(); }); })(jQuery); }).call(this); -;TI"required_assets_digest;TI"%15de93f201cde0bb32d763ce8b85dc87;FI" _version;TI"%2cf3622cbba861b85d33ffabfa420c13;F +;TI"required_assets_digest;TI"%d786914f9794c84c3ab7f7411e7d87b6;FI" _version;TI"%2cf3622cbba861b85d33ffabfa420c13;F \ No newline at end of file