Skip to content

Tag: text

Changing the text after clicking a button in a modal

May I know how to solve my problem, how will it work if you click the button then the confirm button then the text “Hello” will change to a “Hi” word? I tried my best to solve it but I still can not know how to figure my problem that is why I am asking for a help. Answer

How to remove spaces from a string using JavaScript?

How to remove spaces in a string? For instance: Input: Output: Answer This? Example Update: Based on this question, this: is a better solution. It produces the same result, but it does it faster. The Regex s is the regex for “whitespace”, and g is the “global” flag, meaning match ALL s (whitespaces). A great explanation for + can be

Scale and move a text smoothly with javascript

I’m having a text scaled and moved via JavaScript / jQuery. I can’t use jQuerys animate() because it has to fade in and out and has to be repeated and with more elements (end result: “flying” from the background, moving in different directions and fading out). My problem: It’s not running smoothly and causes quite the cpu-usage. Here’s a stripped