Jquery mobile duplicating elements

Asked

Viewed 121 times

-1

inserir a descrição da imagem aqui

<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Troca Games - Games com economia</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">

    <link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css">
    <script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script>
</head>

<body>
<div style="padding:15px; text-align:center">
    <img src="images/logo.png" width="100%"/>
    <br/>
    
    <?php 
        if($_GET['access'])
            echo '<div class="login_failed"><h3>Usuário e/ou senha incorreto(s)</h3></div>'
    ?>
    
    <form action="<?php echo $loginFormAction; ?>" method="post" name="fm_login" class="login" data-transition="slide">
        <input name="usuario_usu" type="text" placeholder="Usuário"></input>
        <input name="senha_usu" type="password" placeholder="Senha"></input>
        <input type="submit" name="bt_login" value="Entrar"></input>
    </form>
    <br/>
    <p style="font-size:20px">Não possui conta? <a href="#">Cadastre-se!</a></p>
    <br>
    <img src="images/login_facebook.jpg" width="100%"/>
    <img src="images/login_google.jpg" width="100%"/>
</div>    
</body>
</html>

  • Your question is rather vague! What elements is he doubling? Edith and better construct your question, because as it is, most likely it will be suspended.

  • You asked the question but did not know how to express the problem, reedit the question clearly and objectively.

1 answer

2

When asking a question in Stack Overflow, always try to reference the Resources (javascript, css or images) through a CDN to facilitate the reproduction of the error.

Another option is to use some website code playground, like the Jsfiddle or Codepen.

Regarding your code, it is important to note that the tag input shall not be closed according to the specification available in HTML 5.1#the-input-element.

I tried to reproduce your problem using the code below, however, all elements were rendered as expected. It is likely that the problem is your file style.css, but we won’t be able to be sure until you share the content of it.

<!DOCTYPE html>
<html lang="pt-BR">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>Troca Games - Games com economia</title>

  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-mobile/1.4.5/jquery.mobile.css">

  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mobile/1.4.5/jquery.mobile.js"></script>

</head>

<body>

  <div style="padding:15px; text-align:center">

    <form method="post" name="fm_login" class="login" data-transition="slide">
      <input name="usuario_usu" type="text" placeholder="Usuário">
      <input name="senha_usu" type="password" placeholder="Senha">
      <input type="submit" name="bt_login" value="Entrar">
    </form>

    <p style="font-size:20px">Não possui conta? <a href="#">Cadastre-se!</a>
    </p>

  </div>

</body>

</html>

  • It is worth mentioning that the important thing is to make a Minimum, Complete and Verifiable Example with all relevant code included here in question/answer (except dependencies like jQuery, jQuery-mobile, etc.)-in a few cases Jsfiddle or Codepen are required, Stack Snippet is preferable as it is here in the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.