NewSignature / us-map

An interactive map of the United States using Raphaël
BSD 2-Clause "Simplified" License
279 stars 184 forks source link

Outputting HTML Instead of Text #52

Open Just-Johnny opened 9 years ago

Just-Johnny commented 9 years ago

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:test@test.com">email me</a>')

To:

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

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

ryangiordano commented 9 years ago

Thank you. This helped me.