# Struggling with tooltips and html

**URL:** <https://talk.observablehq.com/t/struggling-with-tooltips-and-html/4573>\
**Category:** Help\
**Created:** [February 4, 2021, 5:24pm UTC](https://talk.observablehq.com/t/struggling-with-tooltips-and-html/4573 "2021-02-04T17:24:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vix18](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/vix18/32/4322_2.png) [@Vix18](https://talk.observablehq.com/u/Vix18)\
**Post date:** [February 4, 2021, 5:24pm UTC](https://talk.observablehq.com/t/struggling-with-tooltips-and-html/4573/1 "2021-02-04T17:24:28Z")

</div>

Hello, I’m new to Observable and d3 - I’ve come from a python background so I’m finding a lot of the js and html confusing. I would be SO grateful for help as I can’t see what I’m doing wrong!

The scatterplot dots are responding to mouse events (changing size and opacity, for instance) but I also want an html tooltip to appear with some of features of my data points (name, number of followers etc).

I would also love to be able to click through on a mouse click event to the twitter account. The click event is working but d.Name is showing up as ‘undefined’ and I’m not sure why.

The notebook is here

> **[Zoomable Scatterplot](https://observablehq.com/d/fc83a67fff705c0d)**
>
> The scatterplot allows zooming using the mouse or touch.

I would be so grateful for any advice!

---

<div class="post-metadata">

**Author:** ![hellonearthis](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/hellonearthis/32/3935_2.png) [@hellonearthis](https://talk.observablehq.com/u/hellonearthis)\
**Post date:** [February 4, 2021, 10:56pm UTC](https://talk.observablehq.com/t/struggling-with-tooltips-and-html/4573/2 "2021-02-04T22:56:06Z")

</div>

Passing e (the d3.event) and d (the data) to the toolTips on. functions, as well as renaming the d3.event e your references to e to d. And it all work nicely.

Using debugger on the .on(‘mouseover’) gave me the clue to what was happening.

> **[Zoomable Scatterplot](https://observablehq.com/d/7430d08ce5b1283d)**
>
> The scatterplot allows zooming using the mouse or touch.

---

<div class="post-metadata">

**Author:** ![Vix18](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/vix18/32/4322_2.png) [@Vix18](https://talk.observablehq.com/u/Vix18)\
**Post date:** [February 5, 2021, 7:59am UTC](https://talk.observablehq.com/t/struggling-with-tooltips-and-html/4573/3 "2021-02-05T07:59:14Z")

</div>

Thank you so much for this! (I didn’t even know about the debugger so you’ve already given me some more ways to try and improve in observable)
