Skip to main content

City of Chicago Department of Housing, Chicago Renting Right

Citation
City of Chicago Department of Housing, Chicago Renting Right
Jurisdiction
Chicago (municipal)
Source
Official source

Full Text

1,617 chars
#cdsCardVideoModal,#cdsImageModal {
z-index:10000 !important;
}
#cdsCardVideoModal .modal-content {

}
#cdsCardVideoModal .modal-body-video, #cdsImageModal .modal-body {
position:relative;
padding:0px !important;
}

$(document).ready(function() {
var videoUrl = "";
var videoTitle = "";

$("[data-cds-lightbox]").on("click",function(elem) {
var imgSrc = $(elem.target).attr("src");
var imgSrcFull = $(elem.target).attr("data-cds-img-full") || "";
var imgTitle = $(elem.target).attr("title");
if(imgSrcFull!="") {
imgSrc = imgSrcFull;
}
$("#cdsImagePreview").attr("src",imgSrc);
$("#cdsImageTitle").text(imgTitle);
$("#cdsImageModal").modal("show");
});

$("[data-cds-video]").on("click",function(elem) {
videoUrl = $(elem.target).data("cds-video");
videoTitle = $(elem.target).data("cds-video-title");

if( videoUrl && videoUrl !== "" ) {
$("#cdsCardVideoModal").modal("show");
}

});

$('#cdsCardVideoModal').on('hidden.bs.modal', function (e) {
$("#cdsCardVideo").attr("src","");
});

$('#cdsCardVideoModal').on('show.bs.modal', function (e) {
$("#cdsVideoTitle").text(videoTitle);
var video = videoUrl.split("?");
var videoLink = video[0];
var videoParams = "";
if( video.length > 1 ) {
videoParams = video[1] + "&";
}
videoLink = videoLink + "?" + videoParams + "autoplay=1&rel=0";

$("#cdsCardVideo").attr("src",videoLink);
});

});

/*<![CDATA[*/
(function() {
var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true;
sz.src = '//siteimproveanalytics.com/js/siteanalyze_6451.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s);
})();
/*]]>*/