Spun Theme – Mouseovers
-
Hi All,
I’m trying to get HTML mouseover to work with the Spun Theme. I’m using the code:
<img src=”IMG1″ onmouseover=”this.src=’IMG2′” onmouseout=”this.src=’IMG1′” /
Doesn’t seem to be working, no matter what I try. I’m putting .png files into the IMG1 and 2 slots, not sure if that’s the issue?This is for a university project so I’d rather not spend any money on it.
Any help would be much appreciated!
The blog I need help with is: (visible only to logged in users)
-
Hi –
Post here for specific theme-related support:
https://en.forums.wordpress.com/forum/themes -
Hi there.
This code you propose is based on javascript and this is not allowed in WordPress.com. WordPress.com is a shared environment to host blogs. For security reasons WordPress does not allow to add any source code that could be potentially dangerous for the environment.
Anyway you could get a somehow similar effect just using CSS with :hover pseudoelement. The problem is that your blog is protected so volunteers can’t help you :)
Just to give you some ideas:
1) You can put your image as a background of a div and change the value of this property (background) on hover. You could check an example in this link: http://stackoverflow.com/questions/18813299/changing-image-on-hover-with-css-html
2) You can have two alternate divs / pictures and play with display:none and display:block properties for each one on hover.
-
Thanks raulanton. My issue is I can’t edit the CSS because it’s WordPress.com Free and doesn’t allow you to change the style sheet without paying extra.
I guess this won’t really work then, so I’ll have to think of something else.
Thanks for your help!
-
- The topic ‘Spun Theme – Mouseovers’ is closed to new replies.