Hi. I have asked for some help getting images in my repeater to show all in the same sizes. Currently I have both images of buildings and logos in the same repeater and some are landscape, some are portrait, all various sizes.
The code that I was given to include on the page for this fix is:
However, I must not be inserting it at the correct location because it is not adjusting for me.
Do I need to be adding it somewhere else because of the repeater? The images pull from a database in the repeater.
Here is what the code looks like now on the page. I’m sorry I’m not a great coder. Can anyone help?
// For full API documentation, including code examples, visit http://wix.to/94BuAAs$w.onReady(function () {
$w ( “#myImage” ). fitMode = “fit” ;
/**
- Adds an event handler that runs when an element is displayed
in the viewable part of the current window.
Read more - @param {Event} event
/**
- Adds an event handler that runs when the dataset is ready.
*/
I was told that I need to set the fitMode to fit in your code panel and to make sure to add the code in the onReady callback. But I am getting an error in the code and it’s not working.
Thanks.