KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have to be able to change the colour of text via three buttons (red, blue and black) The function I have, which works fine is as follows: function btn_click() { $("#col1 p").css("color", "#00f"); } I need to pass two variables to this function, the specific tag (e.g. col1 p) and the hex value from the following function call: <input type="image" value="" class="but-blue" onclick="btn_click();" /> Can anyone help?
Tags (comma-separated)
Save Edits
Cancel