Find a function $f:X\times X\to \mathbb{R}$ such that restrictions to some sets are continuous but $f$ is not continuous. Find a function $f:X\times X\to \mathbb{R}$ such that, for every $x\in X$, $f\restriction{X\times \{x\}}$ is continuous and $f\restriction{\{x\}\times X}$ is continuous but $f$ is not continuous.
I have been thinking and I shout of functions continuous in either $\{x\}\times X$ or $X\times \{x\}$, and not continuous, but not in both.
For example, take $f:X\times X\to \mathbb{R}$ such that $f(x,y)=\frac{1}{x}$ is $x\in \mathbb{Q}$ and $f(x,y)=0$ is $x\not\in \mathbb{Q}$. This function restricted to $\{x\}\times X$ will be continuous for every $x\in X$, but not in $X\times \{x\}$.
Any help would be appreciated.

One traditional example is
$\displaystyle
f(x,y) = \begin{cases}
\displaystyle\frac{xy}{x^2+y^2}, &\text{if } (x,y)\ne(0,0), \\
0, &\text{if } (x,y)=(0,0).
\end{cases}
$
