Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is .on('load', function () { not working for a button?

Working .on('click'

There is no problem.

myApp.onPageAfterAnimation('about', function (page) {
$$('#button1').on('click', function () {
alert('test');

Not Working .on('load'

Why?

myApp.onPageAfterAnimation('about', function (page) {
$$('#button1').on('load', function () {
alert('test');
like image 495
re1 Avatar asked Dec 11 '25 23:12

re1


1 Answers

onload event only supported HTML tags:

body, frame, iframe, img, input type="image", link, script, style
like image 141
Alien Avatar answered Dec 13 '25 11:12

Alien