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