我有这样的事情:
<div class="baloon">
<div class="baloon-title">Chage title</div>
<div class="baloon-desc">Change description</div>
</div>
<div class="row">
<div class="span1" title="clients" desc="Access all your client details and their history of stays.">
<img src="<?php echo Yii::app()->theme->BaseUrl ?>/img/icons/1.png">
</div>
<div class="span1" title="clients2" desc="Access2 all your client details and their history of stays.">
<img src="<?php echo Yii::app()->theme->BaseUrl ?>/img/icons/2.png">
</div>
我有这样的jquery函数:
$('.span1').mouseover(function(){
title = $(this).attr("title");
desc = $(this).attr("desc");
$('.baloon-title').html(title);
$('.baloon-desc').html(desc);
});
我想更改 div 的内容baloon-title
和baloon-desc
鼠标悬停的span1
. 我究竟做错了什么?在此先感谢您的帮助。