Skip to content

Instantly share code, notes, and snippets.

@azinck
Created April 20, 2015 15:12
Show Gist options
  • Select an option

  • Save azinck/b0f52c1137c9c688eb24 to your computer and use it in GitHub Desktop.

Select an option

Save azinck/b0f52c1137c9c688eb24 to your computer and use it in GitHub Desktop.
// Move header images before .pane-content.
Drupal.behaviors.headerImages = {
attach: function (context) {
$('.box', context).each(function() {
var $image = $('.image.view-mode-block_header:not(.caption)', this).first(),
$box = $image.parents('.box').first();
$image.detach();
$box.prepend($image);
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment