resolves js namespace conflict
This commit is contained in:
parent
a7ad58b452
commit
267d382535
|
@ -1,20 +1,15 @@
|
|||
function get_height(container, ratio) {
|
||||
var height = $(container).width() / ratio
|
||||
return height
|
||||
}
|
||||
|
||||
function adjust_height() {
|
||||
function adjust_vimeo_height() {
|
||||
$(".embeded-vimeo-wrapper").each(function() {
|
||||
var iframe = $(this).find('iframe')
|
||||
var ratio = $(iframe).attr('ratio')
|
||||
$(iframe).prop("height", get_height(iframe, ratio))
|
||||
var height = $(iframe).width() / $(iframe).attr('ratio')
|
||||
$(iframe).prop("height", height)
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
adjust_height();
|
||||
adjust_vimeo_height();
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
adjust_height();
|
||||
adjust_vimeo_height();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue