/    Sign up×
Community /Pin to ProfileBookmark

Render document-fragment? Templates

In my template, there are a #document-fragment, which then contains div classes.

What I’m trying to open a window when pressing on the icon in the menu,
[upl-image-preview url=https://www.webdeveloper.com/forum/assets/files/2018-07-24/1532458888-560884-skarmavbild-2018-07-24-kl-205722.png]

Look at the template id window, and inside it, there is a document fragment. This div inside the #document fragment should be rendered on the site. But they are only visible Chrome DevTools.

Here is what is look like inside the HTML

<template id =”window”>
<div class =”grid-snap” draggable=”true”>

</div>

</template>

The div class is a movable window, which you can drag and drop. It contains a memory game inside the div. i append the game on the window.

Here is some code. Which I create the window and trying to add it to the DOOM.

https://codeshare.io/29rPj1

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@rootJul 24.2018 — Posting an image of code is not helpful at all and better that you post actual code using forum bb code tags (which you have to manually write) to wrap your code in.

You will also get help much faster by posting your code in the thread.
×

Success!

Help @l43 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...