A problem mobile browser an audio playing.
Please help me friends.
I wrote this code
- $("#loginbutton").click(function(){
- var user=$('#log-username').val();
- var pass=$('#log-password').val();
- $.post("<?=$siteurl?>inc/process.php?do=login",{loguser:user,logpass:pass},function(logdata){
- logcontrol=logdata;
- if (logcontrol=="t") { logmsg='Giriş Başarılı.'; }
- if (logcontrol=="u") { logmsg='Kullanıcı adı boş bırakılamaz!'; }
- if (logcontrol=="p") { logmsg='Parola boş bırakılamaz!'; }
- if (logcontrol=="upf") { logmsg='Kullanıcı adı ve parola boş bırakılamaz!'; }
- if (logcontrol=="f") { logmsg='Kullanıcı adı veya parola hatalı!'; }
- if (logcontrol=="pf") { logmsg='Parola boş bırakılamaz!'; }
- if (logcontrol=="uf") { logmsg='Kullanıcı adı boş bırakılamaz!'; }
-
- new jBox('Notice', {
- theme: 'NoticeFancy',
- attributes: {x: 'left', y: 'bottom'},
- color: 'red',
- content: logmsg,
- audio: '<?=$siteurl?>assets/jquery/audio/bling2',
- volume: 80,
- animation: {open: 'slide:bottom', close: 'slide:left'}
- });
-
- });
-
- });
But audio not playing on mobile devices. And ı wrote this code. This code can playing audio but text is before click text. :( eg.
First click.
No Show Message
I write username
Second click Message:
Username and password are empty
Third click.
password is empty
I write password
Fourth click message.
passwrod is empty
Fifth Click.
Login successfull
- $("#loginbutton").click(function(){
- var user=$('#log-username').val();
- var pass=$('#log-password').val();
- $.post("<?=$siteurl?>inc/process.php?do=login",{loguser:user,logpass:pass},function(logdata){
- logcontrol=logdata;
- if (logcontrol=="t") { logmsg='Giriş Başarılı.'; }
- if (logcontrol=="u") { logmsg='Kullanıcı adı boş bırakılamaz!'; }
- if (logcontrol=="p") { logmsg='Parola boş bırakılamaz!'; }
- if (logcontrol=="upf") { logmsg='Kullanıcı adı ve parola boş bırakılamaz!'; }
- if (logcontrol=="f") { logmsg='Kullanıcı adı veya parola hatalı!'; }
- if (logcontrol=="pf") { logmsg='Parola boş bırakılamaz!'; }
- if (logcontrol=="uf") { logmsg='Kullanıcı adı boş bırakılamaz!'; }
-
- });
- new jBox('Notice', {
- theme: 'NoticeFancy',
- attributes: {x: 'left', y: 'bottom'},
- color: 'red',
- content: logmsg,
- audio: '<?=$siteurl?>assets/jquery/audio/bling2',
- volume: 80,
- animation: {open: 'slide:bottom', close: 'slide:left'}
- });
-
- });