Skip to content

translate function should add html and not text to label #251

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

Closed
MaaikeB opened this issue Feb 4, 2016 · 4 comments
Closed

translate function should add html and not text to label #251

MaaikeB opened this issue Feb 4, 2016 · 4 comments

Comments

@MaaikeB
Copy link

MaaikeB commented Feb 4, 2016

I have a slider with the original value and and below it to the original value I want to show a value that is based on the original value.
So for example: USD 63,000 - EUR 56,000

screen shot 2016-02-04 at 4 45 40 pm

Whenever the user changes the slider value, I want to return the two values from the translate function, the second value wrapped in a div with a class so I can position it below the original value.

Yet, since the translate function only adds text and not html to the label, it will display it all as a string, including the

.

solution

at line 617 of rzslider.js, change
label.text(valStr);
to
label.html(valStr);

@ValentinH
Copy link
Member

Great idea! Do you want to submit a PR for this?

@MaaikeB
Copy link
Author

MaaikeB commented Feb 4, 2016

will do

@ValentinH
Copy link
Member

Perfect :) You can follow this guide if you need: https://github.com/angular-slider/angularjs-slider/blob/master/CONTRIBUTING.md

@MaaikeB
Copy link
Author

MaaikeB commented Feb 23, 2016

@ValentinH just updated to the newer version and it works like charm, thanks!

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

No branches or pull requests

2 participants