Показать сообщение отдельно
  #4 (permalink)  
Старый 23.01.2015, 13:30
Профессор
Отправить личное сообщение для ureech Посмотреть профиль Найти все сообщения от ureech
 
Регистрация: 11.03.2013
Сообщений: 765

Шаблон смарти.Такой код
{foreach key=tid item=thread from=$threads}
<div class="data_for" >{$thread.last_msg_array.thread_link}</div>
 <td colspan="3"><div class="data">{$thread.last_msg_array.content_html|strip_tags|truncate:200}</div></td>
{/foreach}

.data{
display:none;
position:absolute;
width:200px;
height:auto;
right:-100px;
top:100px;
background:#fff;
z-index:999;
}
.data_in{
display:inline;
}

здесь в переменной
{$thread.last_msg_array.thread_link}

передаётся ссылка, принаведении на которую делаю видимым класс .data
$(document).ready(function (){
    var o=$('.data_for');
    var b=$('.data');
    o.mouseover(function (){
        $(".data").addClass('data_in');
    });
    o.mouseout(function (){
        $(".data").removeClass('data_in');
    });
});

Но при наведении на любую ссылку {$thread.last_msg_array.thread_link} отображаюися данные первой переменной {$thread.last_msg_array.content_html|strip_tags|tr uncate:200}. Как поправить можно это дело?
Ответить с цитированием