Hi, could anyone tell me why the colour changes when i put the function argument on atom?
when i go on the website the click button doesnt work.
I think there is some problem with atom and after putting function it changes the /script>
Hi, could anyone tell me why the colour changes when i put the function argument on atom?
Hi @AX07, hope you are well.
Now apparently your anonimous function for #myclick
is missing a ‘)’ at the end, would you please share your code so I can test it properly to help you?
You can use the “Preformatted Text” Button to encapsulate any kind of code you want to show.
function formatText(){
X
let words = “I’m a preformatted Text box, Please use me wisely!”
}
Carlos Z.
Thank you again Carlos.
It was that, the missing “)”
<p>click on me</p>
<form >hello</form>
<input id="myform" type="text">
<button id="myclick">click on me</button>
<script>
$("#myclick").click(function(){alert("button clicked")})
</script>
now “script” shows in red and the code works.