<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Naeem Rind</title>
    <description>The latest articles on DEV Community by Naeem Rind (@naeemrind).</description>
    <link>https://dev.to/naeemrind</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F839849%2F3911f89f-14f0-4524-b9ed-74611ecca786.jpeg</url>
      <title>DEV Community: Naeem Rind</title>
      <link>https://dev.to/naeemrind</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/naeemrind"/>
    <language>en</language>
    <item>
      <title>How to Show a div near Cursor position on hover in React js?</title>
      <dc:creator>Naeem Rind</dc:creator>
      <pubDate>Thu, 31 Mar 2022 08:59:09 +0000</pubDate>
      <link>https://dev.to/naeemrind/how-to-show-a-div-near-cursor-position-on-hover-in-react-js-454</link>
      <guid>https://dev.to/naeemrind/how-to-show-a-div-near-cursor-position-on-hover-in-react-js-454</guid>
      <description>&lt;p&gt;I have two Text Items, item1 and item2, and a div with some text inside. I want to keep the div hidden by default but show it at cursor position when I hover on Text item1 or item2. Please check the sample GIF animation in this Link: &lt;a href="https://i.stack.imgur.com/e4lpB.gif"&gt;https://i.stack.imgur.com/e4lpB.gif&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tried this in Jquery code inside React. But it gives error.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$(".text-item").mouseenter(function (e) {&lt;br&gt;
  $(".box")&lt;br&gt;
    .css({&lt;br&gt;
      position: "absolute",&lt;br&gt;
      right: e.pageX,&lt;br&gt;
      top: e.pageY,&lt;br&gt;
      display: "block",&lt;br&gt;
    })&lt;br&gt;
    .show();&lt;br&gt;
});&lt;/code&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>hover</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
