Sha256: 70be132d3fcf153709f2e996e04d277a6a4d6008694597b8b46738b194b1b3b5
Contents?: true
Size: 708 Bytes
Versions: 67
Compression:
Stored size: 708 Bytes
Contents
$(function() { // toggle on/off switch $(document).on('click', '[data-toggle]', function() { targetHide = $(this).data('toggle-hide') targetShow = $(this).data('toggle-show') $('[data-toggle-name="' + targetHide + '"]').addClass('hide') $('[data-toggle-name="' + targetShow + '"]').removeClass('hide') }); // AJAX request utility AJAXRequest = function(url, method, data, success, error) { return $.ajax({ url : url, type : method, data : data, dataType : 'JSON', cache : false, success : function(json) { success(json) }, error : function() { error() } }); } });
Version data entries
67 entries across 67 versions & 1 rubygems