I created a button in the html editor and a function that is executed when it is pressed. This works, however, I would like to write the function in the java script editor, but when I write it there, it is ignored. Can anyone tell me what I am doing wrong? I don't know how the two texts (html and java script) are combined
Thank you!
Page 1 / 1
Hello @Mauricio ,
Assign an unique id attribute to your created button. In javascript under the js(onReady) function write the function using the `on('click')` event of the button as:
jQuery("#BUTTON_ID").on('click',function(){
//function goes here
});
Assign an unique id attribute to your created button. In javascript under the js(onReady) function write the function using the `on('click')` event of the button as:
jQuery("#BUTTON_ID").on('click',function(){
//function goes here
});
Thank you, Shashi! I am so ignorant that I had to find out what jQuery means
First, I wrote literally jQuery, but it didn't work, so I searched a bit more and replaced it with $ and it works Thanks
First, I wrote literally jQuery, but it didn't work, so I searched a bit more and replaced it with $ and it works Thanks
> @Mauricio said:
> Thank you, Shashi! I am so ignorant that I had to find out what jQuery means
> First, I wrote literally jQuery, but it didn't work, so I searched a bit more and replaced it with $ and it works Thanks
Your search appreciated, however `jQuery `should have also worked
> Thank you, Shashi! I am so ignorant that I had to find out what jQuery means
> First, I wrote literally jQuery, but it didn't work, so I searched a bit more and replaced it with $ and it works Thanks
Your search appreciated, however `jQuery `should have also worked
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.