I have a form with <input type="submit"
for which the value
is set dynamically (as currIntValue
).
The goal is to have the value
displayed as 'Search' when the input is hovered, instead of the currIntValue
.
I thought to make two inputs and hide/ unhide each on hover but this isn't having the expected result. Basically the className="int-val"
hides when hovered and quickly reappears/ disappears repetitively.
Here is a basic implementation of what I am trying to describe above:
.int-val {
display: inline;
}
.int-val:hover {
display: none;
}
.search-val {
display: none;
}
.search-val:hover {
display: inline;
}
<input type="submit" value={currIntValue} className="int-val"/>
<input type="submit" value='Search' className="search-val"/>
If this is possible just using CSS, where am I going wrong?
Thanks in advance!