I am trying to figure out how to make the lightbox BC photo gallery. I don’t know why they wouldn’t make him react in the first place, but whatever. Here is the webpage I'm working on: http://ladyilgphotography.businesscatalyst.com/family-photography
Here is what I still have.
<script>
$('body').click(function() {document.getElementById('outerImageContainer').onclick=function(){
var elem = document.getElementById('outerImageContainer');
var newWidth = 0;
var newHeight = 0;
var w = parseInt(elem.style.width);
var h = parseInt(elem.style.height);
var ratio = parseInt(w / h);
newWidth = window.innerWidth - 80;
alert(newWidth);
newHeight = parseInt(newWidth * ratio);
elem.style.width = newWidth + 'px';
elem.style.height = newHeight + 'px';
};});
</script>
I'm sure this is not the cleanest solution or the most effective, but it works!
The problem is that the script runs immediately after loading the image, and then the Business Catalyst script runs, after which the values set by my function are reset.
, , 95% max-width "#outerImageContainer", , , , .
, , , , , , , , .
, , BC , , , ?