$('.dropdown-toggle').parent().find('.dropdown-element').click ->
element = $(@)
container = $('div.container')
element.parents('.btn-group').find('.dropdown-toggle').text(@textContent)
attr = element.data('attribute')
console.log('undef') unless container.data(attr)
container_data = container.data(attr) || new Object
change = element.data('change')
if (place = element.data('place'))
container_data[place] ||= new Object
container_data[place][change] = element.data(change)
else
container_data[change] = element.data(change)
container.data(attr, container_data)