Всплывающие пояснения к кнопкам в постах (Deff)
Всплывающие пояснения к кнопкам:
Профиль, ЛС, E-mail, Удалить, Редактировать, Цитировать
Можно добавить и свои селекторы иных кнопок с пояснениями)
В HTML низ
Профиль, ЛС, E-mail, Удалить, Редактировать, Цитировать
Можно добавить и свои селекторы иных кнопок с пояснениями)
В HTML низ
Код
<style type="text/css">
.wink {
position: relative;
display: inline-block;
}
/* Отображает вверху контента подсказку */
[data-hint-up]:after, [data-hint-up]:before {
opacity: 0;
content: "";
position: absolute;
bottom: 100%;
left: 50%;
z-index: 1000;
cursor: default;
white-space: pre;
}
[data-hint-up]:hover {} /* IE10 без этой строчки не работает */
[data-hint-up]:hover:before {
opacity: 1;
-webkit-transition: opacity 0.2s 50ms ease;
-moz-transition: opacity 0.2s 50ms ease;
-o-transition: opacity 0.2s 50ms ease;
transition: opacity 0.2s 50ms ease;
content: attr(data-hint-up);
border: 1px solid #999;
border-radius: 3px;
font: normal 11px Tahoma;
padding: 5px 5px 5px 25px;
box-shadow: 3px 3px 3px -2px rgba(0,0,0,0.5);
background: #ffffed url('http://s2.uploads.ru/UCx0Z.png') 2px center no-repeat;
margin: 0 0 9px -10px;
}
[data-hint-up]:hover:after {
opacity: 1;
-webkit-transition: opacity 0.2s 50ms ease;
-moz-transition: opacity 0.2s 50ms ease;
-o-transition: opacity 0.2s 50ms ease;
transition: opacity 0.2s 50ms ease;
content: "\25BC";
color: #ffffed;
margin: 0 0 -5px -7px;
text-shadow: 1px 2px 2px #666;
}
</style>
<script type="text/javascript">
var listSelektor = {
'.pl-email a[href*="profile.php?id"]':'Профиль',
'.pl-email a[href*="messages.php?"]':'Отправить личное сообщение',
'.pl-email a[href*="php?email"]':'Отправить E-mail',
'.pl-website a':'Вебсайт',
'.pl-delete a':'Удалить',
'.pl-edit a':'Редактировать',
'.pa-respect a[href*="=1&code"]':'Спасибо за сообщение',
'.pl-quote a[href*="javascript"]':'Цитировать' //Последняя строка без запятой
}
for(var key in listSelektor){
$('#pun-viewtopic .post '+key).addClass('wink').attr('data-hint-up', listSelektor[key]);
}
</script>
.wink {
position: relative;
display: inline-block;
}
/* Отображает вверху контента подсказку */
[data-hint-up]:after, [data-hint-up]:before {
opacity: 0;
content: "";
position: absolute;
bottom: 100%;
left: 50%;
z-index: 1000;
cursor: default;
white-space: pre;
}
[data-hint-up]:hover {} /* IE10 без этой строчки не работает */
[data-hint-up]:hover:before {
opacity: 1;
-webkit-transition: opacity 0.2s 50ms ease;
-moz-transition: opacity 0.2s 50ms ease;
-o-transition: opacity 0.2s 50ms ease;
transition: opacity 0.2s 50ms ease;
content: attr(data-hint-up);
border: 1px solid #999;
border-radius: 3px;
font: normal 11px Tahoma;
padding: 5px 5px 5px 25px;
box-shadow: 3px 3px 3px -2px rgba(0,0,0,0.5);
background: #ffffed url('http://s2.uploads.ru/UCx0Z.png') 2px center no-repeat;
margin: 0 0 9px -10px;
}
[data-hint-up]:hover:after {
opacity: 1;
-webkit-transition: opacity 0.2s 50ms ease;
-moz-transition: opacity 0.2s 50ms ease;
-o-transition: opacity 0.2s 50ms ease;
transition: opacity 0.2s 50ms ease;
content: "\25BC";
color: #ffffed;
margin: 0 0 -5px -7px;
text-shadow: 1px 2px 2px #666;
}
</style>
<script type="text/javascript">
var listSelektor = {
'.pl-email a[href*="profile.php?id"]':'Профиль',
'.pl-email a[href*="messages.php?"]':'Отправить личное сообщение',
'.pl-email a[href*="php?email"]':'Отправить E-mail',
'.pl-website a':'Вебсайт',
'.pl-delete a':'Удалить',
'.pl-edit a':'Редактировать',
'.pa-respect a[href*="=1&code"]':'Спасибо за сообщение',
'.pl-quote a[href*="javascript"]':'Цитировать' //Последняя строка без запятой
}
for(var key in listSelektor){
$('#pun-viewtopic .post '+key).addClass('wink').attr('data-hint-up', listSelektor[key]);
}
</script>
Просмотров: 583, Загрузок: 0, Оценка: 5.0 (1)
Страницы: | |