In HTML I am use to seeing a call to JavaScript functions using input buttons such as:
<input type="button" value="Click Here" onclick="myclick()"></TD>
As I am new to JavaScript, I noticed JavaScript programmers using more things like this:
$(document).ready(function(){
$("#tapDiv").hide();
...
...
...
"onload": function () {
$("#tapDiv").show().click(function(){
$("#tapDiv").hide();
<div id="tapDiv" style='padding:10px;'>Tap to start.</div>
For mobile devices, is it better to stay away from using HTML input buttons and do what the above JavaScript does? I'm use to using input buttons in HTML for use with PHP programs, but I've notice in JavaScript the programmers don't seem to use them as much, especially when it comes to mobile devices.
Is there a reason for this? Does this give more control over the events on the web page? Is this better for game development? Other benefits I should be aware of as I'm learning JavaScript and jQuery?