bsmither Posted March 17, 2019 Share Posted March 17, 2019 You will not be replacing lines of code, but rather adding back two lines of code that was removed from CC622.. This is what you will be wanting to try: if($('a.open-clearing img#img-preview').length) { $('a.open-clearing img#img-preview').load(function() { var ip = $('a.open-clearing img#img-preview'); var ip_height = ip.height(); var ip_width = ip.width(); var min_height = ip_width * 0.7; if(ip_height<min_height) { ip_height = min_height; } $('a.open-clearing img') .css({ 'min-height':ip_height+'px', 'max-height': ip_height+'px' }); }); } Link to comment Share on other sites More sharing options...
CoderJim Posted March 17, 2019 Author Share Posted March 17, 2019 2 minutes ago, bsmither said: try this... Made the change to 2.cubecart.js in CC 6.2.4 Foundation. Its a beautiful thing when a plan comes together, thank you so much, this solved the current issues perfectly. Link to comment Share on other sites More sharing options...
bsmither Posted March 17, 2019 Share Posted March 17, 2019 Edit: Do not do the following. This code allows for the "bounci-ness" of the main image area that we have been working to solve. --------------------- I do not know if the following version of that code is any better, but try: if($('a.open-clearing img#img-preview').length) { $('a.open-clearing img#img-preview').load(function() { var ip = $('a.open-clearing img#img-preview'); var ip_height = ip.height(); var ip_width = ip.width(); var min_height = ip_width * 0.7; if(ip_height<min_height) { ip_height = min_height; } // $('a.open-clearing img') // .css({ // 'max-height': ip_height+'px' // }); $('#open-clearing-wrapper') .css({ 'min-height':ip_height+'px', 'max-height': ip_height+'px' }); }); } Here, the image's container is getting sized, but not the image itself. Link to comment Share on other sites More sharing options...
CoderJim Posted March 17, 2019 Author Share Posted March 17, 2019 Thanks, I will give that a try before too long as I begin to tackle the call.to.action aspect and need to adjust the image size, but at the moment I am back creating content, working off my headache and am a happy camper, thank you again for all your help. I will say that the new 6.2.4 2.cubecart.js is completely different than the previous 6.2.2 version and this is going to drive me nuts when I update another one of my sites before too long, I expect I will be back for more of your wise counsel. Link to comment Share on other sites More sharing options...
bsmither Posted March 17, 2019 Share Posted March 17, 2019 Well, no, not all that different. Just two tweaks and this attempt at fixing the "bounci-ness". Link to comment Share on other sites More sharing options...
CoderJim Posted March 17, 2019 Author Share Posted March 17, 2019 You're the expert, the student I am. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.