Mouse over image resize in post…
-
Is there a way to re-size the image in posts with mouse over? Inserting scrip in the post does not have the desired results:
<script> function bigImg(x) { x.style.height="600px"; x.style.width="300px"; } function smallImg(x) { x.style.height="200px"; x.style.width="100px"; } </script>
The function called within the post:
<img onmouseover="bigImg(this)" onmouseout="smallImg(this)" border="0" src="https://dnsname.of.domain.com/wp-content/uploads/year/month/imagename.jpg" alt="" title="image name" width="100" height="200" />
The image is shown in the post at the size defined in the above code, but no mouse over action. Removing the image size results in the posting results in displaying the original size of the image.Inserting mouse over effect CSS code in to the posting pretty much results in the same; the image shows up in the post, but the image does not change.
It seems that my code above isn’t correct, or the HTML editing of the post has limitation. In which case, is there a way to resize the image in the post with mouse over action?
TIA…
- The topic ‘Mouse over image resize in post…’ is closed to new replies.