Responsive Video

Any CSS or JS ideas how to make Knack video embed responsive. I've tried many tricks and it did not work.

Hi Kelson,

Thank you for your quick response. What is the selectors position in the code?

Hi Abdelghani, 

Here is some code that has worked for me, be sure to change the selectors:

 function handleIFrameSize() {

    const actCard = Knack.$(".activityCard .activityInner");

    const actvCardSize = { w: actCard.innerWidth(), h: actCard.innerHeight() };

    Knack.$(".activityCard iframe").css({

      width: actvCardSize.w + "px",

      height: actvCardSize.w / 1.77 + "px",