to use multiple event listeners they MUST be coded properly as event listeners inside of the JavaScript. You can’t embed event listeners into HTML directly as jumbling HTML and JavaScript together became bad practice long before proper event listeners were added to JavaScript.
…which catered for those with javasript disabled.
As the O.P. totally ignored it, I can only assume that
his conversion to modern coding techniques, sadly,
will not be taking place in the foreseeable future.
We all know that, including the OP. Unlike the rest of us, though, he doesn’t seem to be bothered by that fact. He appears to be living in some kind of weird, time-warp place (a digital Brigadoon, perhaps) where coding styles are archaic and mobiles are insignificant.
We’ve tried to rescue him from that plight, but seem unable to reach him. Maybe it’s some kind of force field…
Sometimes what seems like a “simple” change like moving inline css to external files and removing inline JavaScript is not. For a small simple static website sure. However, for larger web applications it can be tough and introduce a lot of risk for the client. I currently work on a website created 6 years ago built by Indians that is riddled with inline css and JavaScript. Its not pretty but it works. I’m trying to do my best to clean it up but it is a huge job. So people shouldn’t be quick to judge others professionalism based on a few lines of code. A few lines of code only tells a very small story of the whole situation.
You just answered @Paul_Wilkins’s question by replying that you code this way because there is a performance benefit. To know that, you would need to have tested both the inline version and the version with the code separated.
[quote=“asasass, post:15, topic:229747, full:true”]
I don’t believe you can performance test inline html, css, javascript.
[/quote]Then what does your screenshot indicate?
(I’m not at all sure you can accurately test the comparison for just a few lines of code hosted on Blogger, because the page already comes with all the Blogger overheads.)