Just change click()
to mouseover();
.
You can also use mouseenter()
. See the link for more explanation (link).
$( document ).ready(function() {
$('#1').mouseover();
});
$('#1').mouseover(function() {
$('.content').html('This is a text example 1');
});
$('#2').mouseover(function() {
$('.content').html('This is a text example 2');
});
$('#3').mouseover(function() {
$('.content').html('This is a text example 3');
});