I've been experimenting with jQuery to create a unique effect where hovering over my initials in the header expands the containing div and reveals my full name letter by letter. However, I'm facing some challenges and could use some guidance on the best approach.
My current strategy involves dividing my initials "OW" into separate divs, with the letters "wen" and "illiams" placed between them. Here's how it looks:
<div class="initialF inlinediv">O</div>
<div class="fullF inlinediv">wen</div>
<div class="initialL inlinediv">W</div>
<div class="fullL inlinediv">illiams</div>
I initially attempted to use jQuery slideLeft and .fadeIn methods for the animation, but encountered issues with the text jumping around and not smoothly transitioning. The mouseIn/Out events triggering the animations are defined as follows:
<script>
$(".brand").mouseenter(function() {
$('.brand').animate({width: '160px'});
$('.fullF').fadeIn("slow");
});
$(".brand").mouseout(function() {
$('.brand').animate({width: '36px'});
$('.fullF').fadeOut("slow");
});
</script>
I also tried using jquery.lettering.js, but ran into some complications. Any suggestions or tips to guide me in the right direction would be highly appreciated. You can check out my partially functional example on my site at the following link:
http://192.241.203.146/