You can do the following:
- Combine all the objects that have this behavior into one jQuery selector so they can all run the same code.
- Remove the
textarea
from the selector since the ids are unqiue anyway so it isn't needed and should be faster without it. - Extract the id you want from the object's id that is being hovered and grab the ending characters so you can use it to create the other id you want.
- Use
.hide()
instead of.css({'display':'none'});
as a built-in shortcut.
Resulting Code:
$('#pop_01_01, #pop_02_01, #pop_02_02').hover(
function() {$('#text_' + this.id.substr(-5)).fadeIn('fast');},
function() {$('#text_' + this.id.substr(-5)).hide();}
);