So, I see a few things that seem like they might be relevant to this question, but they aren't similar enough for me to be able to use their answer.
Anyway, basically, I want to have a button with a dollar sign in my sidebar. When the mouse is hovered over it, I want it to smoothly slide out and have the word "Donate" on it, keeping the $ on the right side of the button. Then, when the mouse is no longer hovering over it, I want it to slide back in.
Example:
Mouse not over:
$
Mouse over:
e $
te $
(slides all the way out)
Donate $
Except with real buttons. Note: If it can't use an image as the button, that's fine. It'd be nice if I could, but honestly it doesn't matter in the long run, as I can probably make the HTML button look just as nice.
This seems like a really simple question, so I really hate to ask about it, but I simply can't figure it out.
Edit:
Well, here's one thing I tried.
In head tag:
<script type="text/javascript">
$(document).ready(function()
{
$("#imgAnimate1").hover(
function()
{
$(this).attr("src", "donateB.gif");
},
function()
{
$(this).attr("src", "donateA.png");
});
</script>
Where the image is:
<div id="sidebar">
<img id="imgAnimate1" src="Images/donateA.png" alt="" >
</div>
Result (WHILE hovering mouse over it): http://prntscr.com/45js7q