<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to create Better Tooltips with plain JavaScript and CSS	</title>
	<atom:link href="https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/feed/" rel="self" type="application/rss+xml" />
	<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/</link>
	<description>I turn code into captivating user experiences for the web</description>
	<lastBuildDate>Thu, 12 Nov 2020 16:29:40 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.4</generator>
	<item>
		<title>
		By: Andrés Didier (Berta).		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1576</link>

		<dc:creator><![CDATA[Andrés Didier (Berta).]]></dc:creator>
		<pubDate>Thu, 12 Nov 2020 16:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1576</guid>

					<description><![CDATA[OT: Delete previous messages. This is the final post, it didn&#039;t show correctly the data-title inside the HTML a tag (replaced it with another attribute). Sorry for the tests.
Instead of creating a div with the tooltip class, you could replace it with a pseudo-tooltip made in CSS and a custom attribute.
Save title value in data-title attribute without creating class or div.
Example:
HTML
  &lt;pre&gt;&#060;a href=&quot;example.com&quot; data-title=&quot;Lorem Ipsum&quot;&#062; Link &#060;/a&#062;&lt;/pre&gt;
CSS
&lt;pre&gt;
[data-title]: after {
  content: attr (data-title);
  position: absolute;
  bottom: -1.6em;
  left: 100%;
  background-color: black;
  color: white;
}
&lt;/pre&gt;
Could you try it?
Greetings from Argentina and sorry for my English.]]></description>
			<content:encoded><![CDATA[<p>OT: Delete previous messages. This is the final post, it didn&#8217;t show correctly the data-title inside the HTML a tag (replaced it with another attribute). Sorry for the tests.<br />
Instead of creating a div with the tooltip class, you could replace it with a pseudo-tooltip made in CSS and a custom attribute.<br />
Save title value in data-title attribute without creating class or div.<br />
Example:<br />
HTML</p>
<pre>&lt;a href="example.com" data-title="Lorem Ipsum"&gt; Link &lt;/a&gt;</pre>
<p>CSS</p>
<pre>
[data-title]: after {
  content: attr (data-title);
  position: absolute;
  bottom: -1.6em;
  left: 100%;
  background-color: black;
  color: white;
}
</pre>
<p>Could you try it?<br />
Greetings from Argentina and sorry for my English.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: bryan		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1575</link>

		<dc:creator><![CDATA[bryan]]></dc:creator>
		<pubDate>Fri, 14 Aug 2020 22:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1575</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1574&quot;&gt;Jason Burnett&lt;/a&gt;.

Hi,
i am looking for ways to reposition the tooltip automatically.  curious if you have found any?  if on the right of the screen throw tip to the left, if on a small screen, make the tip more vertical, etc.  as i type this, it seems css frameworks are the best way to do so, yet would still like to be able to detect the side of the screen on a desktop so the tool tip could be resized etc.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1574">Jason Burnett</a>.</p>
<p>Hi,<br />
i am looking for ways to reposition the tooltip automatically.  curious if you have found any?  if on the right of the screen throw tip to the left, if on a small screen, make the tip more vertical, etc.  as i type this, it seems css frameworks are the best way to do so, yet would still like to be able to detect the side of the screen on a desktop so the tool tip could be resized etc.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jason Burnett		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1574</link>

		<dc:creator><![CDATA[Jason Burnett]]></dc:creator>
		<pubDate>Wed, 06 May 2020 10:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1574</guid>

					<description><![CDATA[This only works so long as your link is far enough down to display the tooltip. What would be nice is to explain how to position the tooltip so that it is always on the screen. (i.e. under the link if it is at the top of the page).
Also, binding the events to the links themselves disallows new items to be added and also have their links created. Establishing a delegate for all tooltip events would likely be a better solution as it would allow future links with titles to also be handled by the improved tooltip appearance.
Thanks for the tutorial.]]></description>
			<content:encoded><![CDATA[<p>This only works so long as your link is far enough down to display the tooltip. What would be nice is to explain how to position the tooltip so that it is always on the screen. (i.e. under the link if it is at the top of the page).<br />
Also, binding the events to the links themselves disallows new items to be added and also have their links created. Establishing a delegate for all tooltip events would likely be a better solution as it would allow future links with titles to also be handled by the improved tooltip appearance.<br />
Thanks for the tutorial.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Blake		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1573</link>

		<dc:creator><![CDATA[Blake]]></dc:creator>
		<pubDate>Mon, 16 Mar 2020 03:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1573</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1568&quot;&gt;Fiddle&lt;/a&gt;.

You could probably add an &quot;onscroll&quot; event listener that would update the tooltip position on scroll if you wanted to.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1568">Fiddle</a>.</p>
<p>You could probably add an &#8220;onscroll&#8221; event listener that would update the tooltip position on scroll if you wanted to.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: John Doe		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1572</link>

		<dc:creator><![CDATA[John Doe]]></dc:creator>
		<pubDate>Wed, 22 Jan 2020 14:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1572</guid>

					<description><![CDATA[Thank you very much! Way better then any of all the jQuery plugins I&#039;ve tried.]]></description>
			<content:encoded><![CDATA[<p>Thank you very much! Way better then any of all the jQuery plugins I&#8217;ve tried.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Michael Soriano		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1571</link>

		<dc:creator><![CDATA[Michael Soriano]]></dc:creator>
		<pubDate>Fri, 01 Mar 2019 02:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1571</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1570&quot;&gt;Kumar&lt;/a&gt;.

That&#039;s so awesome Kumar!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1570">Kumar</a>.</p>
<p>That&#8217;s so awesome Kumar!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kumar		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1570</link>

		<dc:creator><![CDATA[Kumar]]></dc:creator>
		<pubDate>Thu, 28 Feb 2019 20:06:58 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1570</guid>

					<description><![CDATA[awesome tutorial. Thank you. added some animations and word wrap to tooltips. demo codepen here : https://codepen.io/dagalti/pen/oVjKLR]]></description>
			<content:encoded><![CDATA[<p>awesome tutorial. Thank you. added some animations and word wrap to tooltips. demo codepen here : <a href="https://codepen.io/dagalti/pen/oVjKLR" rel="nofollow ugc">https://codepen.io/dagalti/pen/oVjKLR</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Akanksha		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1569</link>

		<dc:creator><![CDATA[Akanksha]]></dc:creator>
		<pubDate>Thu, 29 Nov 2018 00:46:24 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1569</guid>

					<description><![CDATA[Hi,
The tooltip&#039;s position seems to be off. I came to this article looking for a way to fix the scroll issue for tooltips. Do you have a way you can recommend to fix the position of the tooltip popup with the element it is showed up on. Right now, if you make the browser small enough to have scrollbars, tooltips seemed fixed to their DOM position rather than the highlighted text&#039;s position. Also is their a way to update the position based on browser&#039;s view port?]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
The tooltip&#8217;s position seems to be off. I came to this article looking for a way to fix the scroll issue for tooltips. Do you have a way you can recommend to fix the position of the tooltip popup with the element it is showed up on. Right now, if you make the browser small enough to have scrollbars, tooltips seemed fixed to their DOM position rather than the highlighted text&#8217;s position. Also is their a way to update the position based on browser&#8217;s view port?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Fiddle		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1568</link>

		<dc:creator><![CDATA[Fiddle]]></dc:creator>
		<pubDate>Wed, 17 Oct 2018 13:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1568</guid>

					<description><![CDATA[If the page has been scrolled, the tooltip shows up offset from the link.  In other words, the tooltip seems to be anchored to the links original position.  This is true in Safari, Firefox, and Chrome.  Don&#039;t know about windows only browsers.  You can see for yourself here: https://codepen.io/alihesari/pen/jagGOr  Just make your window small enough that the text at the bottom can be scrolled and watch what happens with the tooltip.]]></description>
			<content:encoded><![CDATA[<p>If the page has been scrolled, the tooltip shows up offset from the link.  In other words, the tooltip seems to be anchored to the links original position.  This is true in Safari, Firefox, and Chrome.  Don&#8217;t know about windows only browsers.  You can see for yourself here: <a href="https://codepen.io/alihesari/pen/jagGOr" rel="nofollow ugc">https://codepen.io/alihesari/pen/jagGOr</a>  Just make your window small enough that the text at the bottom can be scrolled and watch what happens with the tooltip.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: tiffany		</title>
		<link>https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1567</link>

		<dc:creator><![CDATA[tiffany]]></dc:creator>
		<pubDate>Wed, 09 May 2018 04:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsoriano.com/?p=5911#comment-1567</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1565&quot;&gt;Maryam&lt;/a&gt;.

nice article]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://michaelsoriano.com/better-tooltips-with-plain-javascript-css/#comment-1565">Maryam</a>.</p>
<p>nice article</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
