Skip to content

Instantly share code, notes, and snippets.

@Phoen1x84
Last active February 5, 2017 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phoen1x84/c0716abe09940908771cbc992739f2b9 to your computer and use it in GitHub Desktop.
Save Phoen1x84/c0716abe09940908771cbc992739f2b9 to your computer and use it in GitHub Desktop.
Show / Hide the Sitecore page preview ribbon
var UTILS = UTILS || {};
UTILS.editorGridToggle = (function ($) {
'use strict';
var init = function () {
if ($('#scWebEditRibbon').length) {
$('.overlay-grid-toggle-btn').show();
$(document).on('click', '.overlay-grid-toggle-btn', function (e) {
e.preventDefault();
$('.overlay-grid').toggle();
});
}
};
return {
init: init
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment