gruene-seele/resources/assets/vendor/libs/vegas/_extension.js
2021-01-08 17:48:20 +01:00

18 lines
359 B
JavaScript

// Make vegas responsive
//
const fnVegas = $.fn.vegas
$.fn.vegas = function (...args) {
const result = fnVegas.apply(this, args)
if (args[0] === undefined || typeof args[0] === 'object') {
this.each(function() {
if (this.tagName.toUpperCase() === 'BODY' || !this._vegas) return
$(this).css('height', '')
})
}
return result
}