Closed BartHuismanKM closed 2 years ago
Thanks for emailing me dude! lol I guess it just concatenates a string instead of adding the two numbers 🤣 I'll look into it! Glad you like the plugin!
Ah self.iframe.parentNode.offsetHeight + self.params.offset;
since param is set via attribute it's a string not a number, so I just need to update this with parseInt(self.params.offset, 10)
Thanks for catching this! ❤️
thanks, we'll update when fixed :)
https://github.com/stamat/jquery.youtube-background/blob/f9ad26d3aacc40b73d744f6d1fbcc9c8122a7ad0/src/youtube-background.js#L194
When i set the div attributes to for example: data-ytbg-fit-box="false" data-ytbg-offset="20"
the width would be set to 192020px instead of 1940px.