This question is motivated from Thomae's function continuity at irrationals together with the fact that transcendental numbers are dense in real numbers.
Let $$f(x) = \begin{cases}1 &, \text{x is algebraic}\\ 0 &, \text{ x is transcendental}. \end{cases}$$
I "think" $f(x)$ is continuous over transcendental numbers but I can't prove it.however I may be wrong. Thanks in advance.
No, this function lacks the essential property of Thomae's function, which is that it is close to zero on many rationals. In particular, for any $\varepsilon > 0$, Thomae's function is smaller than $\varepsilon$ in an open ball around every irrational number. Your function would be continuous at a transcendental number $x$ only if there were an open interval $(x−\delta,x+\delta)$ containing no algebraic numbers. This never happens, as the algebraic numbers are dense in $\mathbb{R}$.
On the other hand, it should be possible to modify your function to obtain one with the desired property. For instance, each algebraic number is a root of some $n$-th order polynomial with integer coefficients $a_0,a_1,\ldots, a_n$. Define the size of a polynomial to be $\max\{n, |a_0|, |a_1|,\ldots, |a_n|\} \ge 1$, and define the size $S(x)$ of an algebraic number to be the smallest size of any polynomial with $x$ as a root. Then the function $$ \cases{0 & \text{if $x$ is transcendental}\\ 1/S(x) & \text{if $x$ is algebraic}} $$ is continuous at every transcendental number and discontinuous at every algebraic number.