Jquery Mobile is adding text above my "<input type=submit"> automatically, how do i prevent this?

Posted by Jack Dalton on Stack Overflow See other posts from Stack Overflow or by Jack Dalton
Published on 2014-06-11T15:20:58Z Indexed on 2014/06/11 15:24 UTC
Read the original article Hit count: 139

Filed under:
|
|
|
|

I've just begin work on a mobile version for one of my sites.

I've set up my sign up form for my users. It worked fine and the CSS styled it correctly.

@using (Html.BeginForm("XXX", "Registration", FormMethod.Post, new { @class = "twitter-sign-in-container" }))
{
    <input type="submit" name="twitter-button" value="Sign in with Twitter" id="twitter-button" />
}

Once I added Jquery mobile to the project if found that random unstyled text started to show up.

On inspection I found that all input submits where being wrapped in new tags and adding un tagged text == to the inputs "Value":

<form action="/registration/xxx" class="twitter-sign-in-container" method="post">
    <div class="ui-btn ui-input-btn ui-corner-all ui-shadow">
            "Sign in with Twitter"
            <input type="submit" name="twitter-button" value="Sign in with Twitter" id="twitter-button">
    </div>
</form>

Does anyone have any clue as to why the "sign up with twitter" text is being added, and how i stop it?

P.S Less important but I'd also like to know why Jquery wraps form contents in the bellow div.

© Stack Overflow or respective owner

Related posts about c#

Related posts about css