Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-tooltip-1.0.js

Код файла
Версия от 18.08.2026, 07:00:16 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
601						}602 603						if (!identical) {604							self.reposition();605							self.options.positionTrackerCallback.call(self, self.element);606						}607					}608				}609			}, 200);610		},611 612		_interval_cancel: function () {613
История файла и сравнение версий
  • 18.08.2026, 07:00:16 · 56c3b845
clearInterval(this.checkInterval);
614 // clean delete
615 this.checkInterval = null;
616 },
617
618 _content_set: function (content) {
619 // clone if asked. Cloning the object makes sure that each instance has its own version of the content (in case a same object were provided for several instances)
620 // reminder : typeof null === object
621 if (typeof content === 'object' && content !== null && this.options.contentCloning) {
622 content = content.cloneNode(true);
623 }
624
625 this.Content = content;
626 },
627
628 _content_insert: function () {
629 var self = this;
630 var tooltipsterContent = self.tooltip.querySelector('.tooltipster-content');
631
632 if (typeof self.Content === 'string' && !self.options.contentAsHTML) {
633 tooltipsterContent.textContent = self.Content;
634 } else {
635 tooltipsterContent.innerHTML = self.Content;
636 }
637 },
638
639 _update: function (content) {
640 var self = this;
641 // change the content
642 self._content_set(content);
643
644 if (self.Content !== null) {
645 // update the tooltip if it is open
646 if (self.Status !== 'hidden') {
647 // reset the content in the tooltip
648 self._content_insert();
649 // reposition and resize the tooltip
650 self.reposition();
651 // if we want to play a little animation showing the content changed
652 if (self.options.updateAnimation) {
653 if (supportsTransitions()) {
654 // prettier-ignore
655 var strStyle =
656 'width:' +
657 '-webkit-transition: all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms' +
658 '-moz-transition: all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms' +
659 '-o-transition: all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms' +
660 '-ms-transition: all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms' +
661 'transition: all ' + self.options.speed + 'ms, width 0ms, height 0ms, left 0ms, top 0ms';
662
663 self.tooltip.setAttribute('style', strStyle);
664 t_addClass(self.tooltip, 'tooltipster-content-changing');
665
666 // reset the CSS transitions and finish the change animation
667 setTimeout(function () {
668 if (self.Status !== 'hidden') {
669 t_removeClass(self.tooltip, 'tooltipster-content-changing');
670
671 // prettier-ignore
672 var strStyle =
673 '-webkit-transition: ' + self.options.speed + 'ms' +
674 '-moz-transition: ' + self.options.speed + 'ms' +
675 '-o-transition: ' + self.options.speed + 'ms' +
676 '-ms-transition: ' + self.options.speed + 'ms' +
677 'transition: ' + self.options.speed + 'ms';
678
679 // after the changing animation has completed, reset the CSS transitions
680 setTimeout(function () {
681 if (self.Status !== 'hidden') {
682 self.tooltip.setAttribute('style', strStyle);
683 }
684 }, self.options.speed);
685 }
686 }, self.options.speed);
687 } else {
688 self.tooltip.fadeTo(self.options.speed, 0.5, function () {
689 if (self.Status !== 'hidden') {
690 self.tooltip.fadeTo(self.options.speed, 1);
691 }
692 });
693 }
694 }
695 }
696 } else {
697 self.hide();
698 }
699 },
700
Предыдущие 100 строкСледующие 100 строк