Sha256: 7cd894eb5a00ba77c4eb2a5a03bee56da8cc922f573de1b7fd035d11f047ed4b
Contents?: true
Size: 800 Bytes
Versions: 9
Compression:
Stored size: 800 Bytes
Contents
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. $(function() { $('.ominous_warnings .reveal_hidden').click( function() { $('.ominous_warnings .start_visible').hide(); $('.ominous_warnings .start_hidden').show(); return false; }); $('.ominous_warnings .close_and_dismiss_warning').click( function() { send_data_to_server($(this).attr('href')); $(this).closest('.warning').hide('fade'); return false; }); function send_data_to_server(url) { $.ajax({ type: "PUT", url: url, success: function (data) { // console.log(data); }, error: function () { // console.log('Error updating'); } }) } })
Version data entries
9 entries across 9 versions & 1 rubygems