1

I'm trying to set the width and height of TikTok's embedded post in my webpage because the default size seems to big.

From the documentation on TikTok's Developer site, we can't manually set the width and height of the embedded content so I'm planning to set its height when the embedded content is fully loaded.

When I inspect the webpage, here are the piece of code generated when the embedded content is not fully loaded yet : enter image description here

The dynamically generated piece of code is the <iframe> tag (and also many tags inside of it).

And those code change when the iframe is fully loaded, like this : enter image description here

I already know which tags/elements I should apply CSS to to make the Embedded video smaller, but i don't know how to select the generated element using jQuery. How can I achieve this?

Note : "Dynamically generated" code means that i don't write the code myself, but the code generated because i write the embed code.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Dhimas Yoga
  • 87
  • 10

0 Answers0