etidd
June 6, 2011, 2:42am
1
Hello everyone,
I have a question today about making a rollover effect on top of the jQuery Font Effect plugin, like change the gradient color in this Anchor Tag. The code in my JavaScript looks like this.
<script type="text/javascript">
$('#realmaturesingles').FontEffect({
gradient:true,
mirror:true,
mirrorColor:"#CCC"
})
$('#seniorpeoplemeet').FontEffect({
gradient:true,
mirror:true,
mirrorColor:"#CCC"
})
How can I make a change to this using onmouseover html trigger? I need a function that would change the mirrorColor and color contained in the CSS styles for #seniorpeoplemeet and #realmaturesingles .
look at the docs of jQuery for the .hover( ) method
etidd
June 6, 2011, 10:08pm
3
I find this response to be not very helpful.
etidd
June 6, 2011, 10:29pm
4
This is my best attempt:
<script type="text/javascript">
$('#seniorpeoplemeet').FontEffect({
gradient:true,
mirror:true,
mirrorColor:"#CCC"
})
$('#realmaturesingles').FontEffect({
gradient:true,
mirror:true,
mirrorColor:"#CCC"
})
function seniorPeopleMeetInitial()
{
$('#seniorpeoplemeet').FontEffect({
gradient:true,
mirror:true,
mirrorColor:"#CCC"
})
}
function realMatureSinglesInitial()
{
$('#realmaturesingles').FontEffect({
gradient:true,
mirror:true,
mirrorColor:"#CCC"
})
}
function seniorPeopleMeetChange()
{
$(this).find("#seniorpeoplemeet").css('color', '#666');
}
function realMatureSinglesChange()
{
$(this).find("#realmaturesingles").css("color", '#666');
}
$("#realmaturesingles").hover(realMatureSinglesChange(), realMatureSinglesInitial());
$("#seniorpeoplemeet").hover(seniorPeopleMeetChange(), seniorPeopleMeetInitial());
</script>