11

I have a standard link I want to style my own way within a footer like so:

<div data-role="page">
<div id="footer" data-role="footer" data-position="fixed">
    <a href="somelink.html>some link</a>
</div>

I want the <a> tag to stay as is and not be transfered into this:

<a href="somelink.html" data-theme="a" class="ui-btn ui-btn-corner-all ui-shadow ui-btn-up-a">
    <span class="ui-btn-inner ui-btn-corner-all">
        <span class="ui-btn-text">some link</span>
    </span>
</a>

Is there some kind of attribute I can add to the link to stop JQM generated this themed code? I need something similar to the data-role="none" class explained here (but not for a form element)

1 Answer 1

19

It's just as you said, add the data-role="none" attribute to the anchor tag.

HTML:

<div data-role="page">
    <div id="footer" data-role="footer" data-position="fixed">
        <a href="somelink.html" data-role="none">some link</a>
    </div>
</div>
Sign up to request clarification or add additional context in comments.

2 Comments

Ah yes of course - I was using the wrong version (alpha 2) and this has been fixed in the latest (alpha 4) :/
Thank you! Exactly what I was looking for. This is especially helpful when you want to "turn off" JQuery Mobile UI for certain elements. Ex: @Html.RadioButtonFor(g => g.myProfile.Gender, "Female", new { data_role = "none" }) Female

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.