Commit ec211d59 authored by marcheing's avatar marcheing Committed by Diego de Araújo Martinez Camarinha

Change state select into coffee script

parent d10e64e7
state_select = (event) ->
$.get(
'/states',
{
country: $('select#profile_country :selected').text(),
locale: $('#locale').val()
},
(data) ->
$('div#state_select').html(data)
)
$(document).ready(state_select)
$('select#profile_country').on('change', state_select)
function state_select(event) {
$.get('/states',
{ country: $('select#profile_country :selected').text(), locale: $('#locale').val() },
function(data) { $('div#state_select').html(data); }
);
}
$(document).ready(state_select);
$('select#profile_country').on('change', state_select);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment