Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M4Q append td #9

Closed
KlumsD opened this issue Oct 19, 2021 · 2 comments
Closed

M4Q append td #9

KlumsD opened this issue Oct 19, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@KlumsD
Copy link

KlumsD commented Oct 19, 2021

Hi Olton,

Describe the bug
$("< td>td content< /td>");
is not returning an HTMLElement.

To Reproduce
https://codepen.io/KlumsD/pen/jOLrwbd
Adding js generated td to a table.
if empty, it is added.
if not empty, it isn't added.

Same for < tr>

Expected behavior
It should work as the < p > exemple here :
https://metroui.org.ua/m4q-manipulation.html

Screenshots
image

Desktop (please complete the following information):

  • OS: Win
  • Browser Firefox
  • Metro Version v4.5.0

Thanks !

Best Regards

@xscode-auto-reply
Copy link

Thanks for opening a new issue. The author has been notified and will review it as soon as possible.
For urgent issues and priority support, visit https://xscode.com/olton/Metro-UI-CSS or Patreon

@olton olton transferred this issue from olton/metroui Oct 19, 2021
@olton olton added the bug Something isn't working label Oct 19, 2021
@KlumsD
Copy link
Author

KlumsD commented Nov 4, 2021

Hi Olton,

I've found this issue on StackOverflow which explain the problem of <tr> <td> etc.

Searching the subject, I found a neat workaround solution with great browser compatibility:
insertAdjacentHTML

Cool Stacks about the same subject :

Mozilla Doc:

Ex :
document.getElementById('tableBody').insertAdjacentHTML('beforeend', trElement);

Best Regards

@olton olton closed this as completed Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants