mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Bring and require jquery.vAlign.js from spree_backend
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
//= require jquery.powertip
|
||||
//= require jquery.cookie
|
||||
//= require jquery.jstree/jquery.jstree
|
||||
//= require jquery.vAlign
|
||||
//= require angular
|
||||
//= require angular-resource
|
||||
//= require angular-animate
|
||||
|
||||
11
vendor/assets/javascripts/jquery.vAlign.js
vendored
Normal file
11
vendor/assets/javascripts/jquery.vAlign.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
(function ($) {
|
||||
// VERTICALLY ALIGN FUNCTION
|
||||
$.fn.vAlign = function() {
|
||||
return this.each(function(i){
|
||||
var ah = $(this).height();
|
||||
var ph = $(this).parent().height();
|
||||
var mh = Math.ceil((ph-ah) / 2);
|
||||
$(this).css('margin-top', mh);
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user