Sha256: 9421c43bc0099a124ebcd8e8b3ef058820481398b277680a8d8733b3a63e741d
Contents?: true
Size: 650 Bytes
Versions: 8
Compression:
Stored size: 650 Bytes
Contents
# make things editable that can be edited # $('.editable').editable( # success: (response, value) -> # element = $(this) # css = element.data('classes') || {} # element.removeClass(class_name) for key, class_name of css # element.addClass(css[value]) # element.css('background-color', '') # ) # swap CSS classes when the value changes jQuery ($) -> $("[data-classes]").on "save", (e, data) -> value = data.newValue element = $(this) css = element.data('classes') || {} element.removeClass(class_name) for key, class_name of css element.addClass(css[value]) element.css('background-color', '')
Version data entries
8 entries across 8 versions & 2 rubygems