Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Outputting HTML Instead of Text #52

Open
Just-Johnny opened this issue Jul 13, 2015 · 1 comment
Open

Outputting HTML Instead of Text #52

Just-Johnny opened this issue Jul 13, 2015 · 1 comment

Comments

@Just-Johnny
Copy link

It took me a while to figure this one out and it's rather simple - for people with greater JS knowledge than myself. If you're like me and you want the default #alert ID to output HTML, change the .text to .html.

From:

 $('#alert')
.text('Click '+data.name+' on map 2 <a href="mailto:[email protected]">email me</a>')

To:

 $('#alert')
.html('Click '+data.name+' on map 2 <a href="mailto:[email protected]">email me</a>')

This isn't so much an issue - I just hope it helps someone save time in the future!

@ryangiordano
Copy link

Thank you. This helped me.

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