javascript - jquery executes declared function without me clicking -
I do not know why the browser has clicked on the link without clicking on the "clicked links". This displays it whenever I refresh the page.
& lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {function login () {alert ("logged in")}} $ ("# click here"). Click (login);}); & Lt; / Script & gt;
I want to display it while clicking on the link.
What is the problem?
You must remove () after entering the JQuerys click () function.
& lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {function login () {alert ("logged in");} $ ("# click here"). Click (login);}); & Lt; / Script & gt;
Comments
Post a Comment