{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() { (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'); 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]))); } 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