Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

script tag that contains template is in another context #16

Closed
giolvani opened this issue Jan 29, 2013 · 3 comments
Closed

script tag that contains template is in another context #16

giolvani opened this issue Jan 29, 2013 · 3 comments

Comments

@giolvani
Copy link

Hi, i'm using the code

tmpl("tmpl-demo", {})

but my code is in iframe and my script tag that have a template content, is out this iframe, i.e., in my parent!

How can i take the element #tmpl-demo?

@blueimp
Copy link
Owner

blueimp commented Jan 30, 2013

How to access content on another frame is out of context of this library, but you'll find documentation about this elsewhere on the web.
After you retrieved the content, simply call the tmpl method with the content string as first argument instead of a document ID (which is also explained in the API documentation).

@blueimp blueimp closed this as completed Jan 30, 2013
@giolvani
Copy link
Author

Thank you so much Sebastian,

My fault, i didn't realized this part of documentation!

Até a próxima...

@blueimp
Copy link
Owner

blueimp commented Jan 30, 2013

You're welcome. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants