1

So while testing on my computer it works just fine, but as soon I test it on my phone it breaks...

<%: Html.ActionLink("About", "About", "Home", null, new { data_role = "button", data_iconpos = "right", data_icon = "arrow-r", data_shadow = "false", @class = "arrowButton" })%>

That successfully renders a hyperlink styled like a button, and when pressed on my phone gives the appropriate feedback to let me know I pressed it. However this button here

<a id="submitBtn" href="" data-role="button" data-theme="b" onclick="$('#formControl').submit();" >Sign In</a>

and EVERY OTHER BUTTON on the site (this was originally an input with type="submit" on it, but I changed it to make as much the same between the 2 as possible) won't show any feedback when you press them on my phone. Any ideas why this might be happening?

tl:dr Hyperlinks visually show clicks on my phone but buttons don't.

Brent Echols
  • 590
  • 2
  • 9

1 Answers1

1

Based on the statement

Hyperlinks visually show clicks on my phone but buttons don't.

I think I know your problem. See this fiddle http://jsfiddle.net/nachiket/wBe9M/

<button data-role="button">Button with data role</button>            
<button>Button without data role</button>  

When you specify data-role for button, it doesn't show button highlight or pressed animation, as data-role is not needed for button.

Nachiket
  • 6,021
  • 6
  • 41
  • 47
  • Only problem with this fiddle is that jQuery Mobile isn't being included, and once you add it then it works with all of the buttons – Brent Echols Jun 22 '12 at 16:15
  • 1
    Its working for me, without adding anything else, I have put jQuery mobile ref for JS and CSS in "Manage Resources" tab. – Nachiket Jun 22 '12 at 18:31
  • 1
    I can get everything to work fine on my computer, but for some reason on all the mobile devices i've tested it still doesn't show up :\ – Brent Echols Jun 22 '12 at 19:24
  • 1
    can you make a fiddle or gist, having your problem? so I can execute, and help to solve you this problem. – Nachiket Jun 22 '12 at 20:06
  • 1
    I'm trying! The only problem is I'm having a lot of trouble reproducing anywhere else other than on my dev servers. After looking at this post http://stackoverflow.com/questions/10027441/jquery-mobile-hyperlink-button-animation-not-firing I think that my version is the issue. Thanks for the help though it is much appreciated... have some upvotes! – Brent Echols Jun 22 '12 at 22:33