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