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

How to I access a specific html file? #7

Open
chubaka opened this issue May 4, 2016 · 1 comment
Open

How to I access a specific html file? #7

chubaka opened this issue May 4, 2016 · 1 comment

Comments

@chubaka
Copy link

chubaka commented May 4, 2016

Hi, now that have installed domquery, how do I tell it to access a specific html ( or handlebars) file in my app? How does it know which file it is manipulating the dom for?

@TehShrike
Copy link
Member

You can use domquery to insert html (in the form of a string) into the DOM: https://github.com/npm-dom/domquery#adding-and-removing-elements

If you need to load the html from a server, you'll need to use XHR to do that outside of domquery.

domquery is not for manipulating html strings - if you're running node.js, you probably want cheerio.

If you need a templating engine to take your html/mustache files and put them in the DOM, I would recommend Ractive.

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

No branches or pull requests

2 participants