Change the Color of Text in HTML using JQuery
In this example, We will show you about, How to change the color of text in Html using JQuery. The example has been tested and output shared in the same post.
JQuery Script
function chnageTextColor(value) { $('#content').css("color", value); }
Complete Example
<html> <head> <title>How to Change the Color of Text in HTML using JQuery</title> </head> <body> <h1 id="content"> Hello World </h1> <div> <input type="color" onchange="chnageTextColor(this.value);"> </div> <script> function chnageTextColor(value) { $('#content').css("color", value); } </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> </body> </html>
Output
More from my site
Hello, folks, I am a founder of idineshkrishnan.com. I love open source technologies, If you find my tutorials are useful, please consider making donations to these charities.