Sha256: 5ce5ff234370105f908335e8ab261339918bfd1d8eccb342fd51cd442e738f44

Contents?: true

Size: 786 Bytes

Versions: 31

Compression:

Stored size: 786 Bytes

Contents

$('[data-toggle="remote-load"]').click(function(e) {
  e.preventDefault();
  var activator = this;
  var remote = $(this).attr("href");
  var target = $(this).attr("data-target");
  if ($(target).filter(":empty").length > 0) {
    $(target).hide();
    $.ajax($(this).attr("href"), {
      success: function(data) {
        $(target).append($('<div data-type="remote-load"></div>').append(data));
        $('[data-dismiss="remote-load"]', $(target)).on('click', function(e) {
          e.preventDefault();
          $(activator).click();
        });
        $(target).slideDown('slow');
      }
    });
  } else if ($(target).filter(":hidden").length > 0) {
    $(target).slideDown('slow');
  } else if ($(target).filter(":visible").length > 0) {
    $(target).slideUp('slow');
  }
});

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
smithycms-0.5.1 app/assets/javascripts/smithy/guides.js
smithycms-0.5.0 app/assets/javascripts/smithy/guides.js
smithycms-0.4.5 app/assets/javascripts/smithy/guides.js
smithycms-0.4.4 app/assets/javascripts/smithy/guides.js
smithycms-0.4.3 app/assets/javascripts/smithy/guides.js
smithycms-0.4.2 app/assets/javascripts/smithy/guides.js
smithycms-0.4.1 app/assets/javascripts/smithy/guides.js
smithycms-0.4.0 app/assets/javascripts/smithy/guides.js
smithycms-0.0.3 app/assets/javascripts/smithy/guides.js
smithycms-0.0.2 app/assets/javascripts/smithy/guides.js
smithycms-0.0.1 app/assets/javascripts/smithy/guides.js