Technical Details
Forum version : #PunBB
Position : Member
Concerned browser(s) : Mozilla Firefox
Who the problem concerns : Yourself
Forum link : ( link is hidden, you must reply to see )
Description of problem
I'm trying to create a post template whose colour changes when hovered over, then reverting when the mouse is not hovered over the element. I am trying to utilise the onmouseover and onmouseout events, however the 'o's keep getting replaced by their character entities, 'o' when the code is viewed via the inspect element developer tool of my browser, and it does not work.for instance,
- Code:
<div style="background:white" onmouseover="this.style.background='black'" onmouseout="this.style.background='white'"></div>
- Code:
<div style="background:white" onmouseover="this.style.background='black'" onmouseout="this.style.background='white'"></div>
I know I can use a style block with hover state selection, however I'd prefer to limit the use of that because I may use the template several times in a thread, and I don't want to slow anybody looking at the thread down, as well as a few other reasons.
thanks,