javascript - Using MouseUp instead of AutoFocus as a solution for iPad or iPhone -
here script. i'm trying 1 field auto focus on browsers, mobile borwsers, , ipad browser, cannot work. can me please? i'm trying: o
on http://boxoffice.jokerzcomedyclub.com/scanner/ , object field automatically start cursor in it. works on computers, doesn't work on ipad or iphone, i'm looking other alternatives. please help.
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>validate ticket</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script src="js/jquery.autofocus-min.js"></script> <script> $('.label').mouseup(function(){ $('[autofocus=""]').autofocus(); }); /*$('.label').mouseup(function(){ $('input').focus(); });*/ </script> <script type="text/javascript"> /* window.onload = function() { document.forms[0].barcode.focus(); }*/ </script> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <br /> <div style="width:200px; border:1px #999 solid; text-align:center;"> <form action="" method="get"> <select name="events" class="listclass">
did try with
$(document).ready(function(){ $('.label').focus(); });
Comments
Post a Comment