Javascript-форум (https://javascript.ru/forum/)
-   Internet Explorer (https://javascript.ru/forum/css-html-internet-explorer/)
-   -   Некорректно работает хинт (https://javascript.ru/forum/css-html-internet-explorer/9676-nekorrektno-rabotaet-khint.html)

exec 31.05.2010 17:03

Некорректно работает хинт
 
Вот код хинта:

var boofer = null;
$('a[title]').hover(function (e) {
	e = e || window.event;
	boofer = this.title,
	this.title = '';
	$('body').append($('<div class="hint" style="opacity: 0; color: #fff; padding: 3px; position: absolute; border: 1px dashed #eee; background: #555;"></div>').css({
		top: e.pageY + 20,
		left: e.pageX + 20
	}).html(boofer).animate({
		opacity: 0.8,
		top: '-=10px',
		left: '-=10px'
	},
	300));
	$(this).mousemove(function (ev) {
		ev = ev || window.event;
		$('div.hint').css({
			top: ev.pageY + 10,
			left: ev.pageX + 10
		});
	});
},
function () {
	$('div.hint').animate({
		opacity: 0,
		top: '+=10px',
		left: '+=10px'
	},
	300, function () {
		$(this).remove();
	})
	$(this).mousemove(null),
	this.title = boofer;
});


Если в IE навести мышкой на ссылку второй раз, то в хинте ничего нет. Почему?

B~Vladi 02.06.2010 17:40

Цитата:

Сообщение от exec
$(this).remove();

Тебе о чем-нибудь говорит?

exec 02.06.2010 17:47

Цитата:

Тебе о чем-нибудь говорит?
А что не так? При наводке мышкой div снова создаётся.

B~Vladi 02.06.2010 17:50

Цитата:

Сообщение от exec
А что не так? При наводке мышкой div снова создаётся.

А ну да. Бред какой-то.

exec 02.06.2010 19:12

Спасибо за оценку моего алгоритма, а теперь можно ближе к теме?


Часовой пояс GMT +3, время: 09:13.