Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
149 views
in Technique[技术] by (71.8m points)

javascript - Include a Handlebars Helper Inside Jquery html When Updating Element

Summary: I have an element whose html I am updating through jquery. I also have a handlebars helper {{helperName variable1}}

Side Note: If you're curious my helper helps format a decimal number in price format. (price 1234.56) results in $1,234.56

Question: How can I pass this helper with a variable dynamically through jquery?

What I Have Tried: I am trying: $("#elementId').html("{{helperName variable1}}") but that is also not working and rendering the text exactly as is.

Thanks for any help.

question from:https://stackoverflow.com/questions/65839409/include-a-handlebars-helper-inside-jquery-html-when-updating-element

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...