Sha256: 5537377fe895b1c86afa7401be3c37f5b51ab998c2a9d54a93d0b44fda043d70
Contents?: true
Size: 709 Bytes
Versions: 37
Compression:
Stored size: 709 Bytes
Contents
var eventEnabled = true $("document").ready(function(){ $(".widget_type").change(function(){ if($(this).attr('value') == 'event' || $(this).attr('value') == 'both') { $('.events').removeClass('hidden'); eventEnabled = true } else { $('.events').addClass('hidden'); eventEnabled = false } }); }) $("#widget-form").bind("ajax:beforeSend", function(evt, data, status, xhr){ if (eventEnabled && $('#event_id').val() == "") { setErrorMessage("Please select an event") return false; } else { $('.flash').remove() } }); $("#widget-form").bind("ajax:success", function(evt, data, status, xhr){ $('.the-code').removeClass('hidden') $('#widget-code').html(data) });
Version data entries
37 entries across 37 versions & 1 rubygems