Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery mobile data-icon not appearing on a mobile device

I have a mobile web application (.NET MVC) and I'm using JQuery Mobile (beta 3 & jQuery 1.6.3). My question is regarding the attribute 'data-icon' on various elements. For example, I have an element:

<a href="@Url.Action("Index", "Home")" data-icon="home" data-iconpos="notext">Home</a>

When I run the application locally, everything appears as expected. There is a small circular button with the 'home' image inside. When I deploy my application to my host (Arvixe), this same button renders as expected in Chrome, but does not render as expected on my mobile phone (Nexus One). On my phone, the home icon image does not appear at all.

JQuery mobile is referencing the image sprites in the following manner:

background-image:url(images/icons-18-white.png);

I can verify this image does in fact exist in the proper location, as it appears on the desktop browser, I can get to it with a URL (Desktop and Mobile) and my host log shows that requests to that URL are coming back with a 200 response. I have even connected my web application, while hosted to a weinre server, and I can verify the DOM element does have the correct image path. What's even stranger, is that when I go to jquerymobile.com on my phone, the same icons appear, the problem seems isolated to my hosted site.

Is there something I'm overlooking? Thanks.

like image 782
Jon Avatar asked Dec 28 '25 02:12

Jon


1 Answers

I think I may have solved this. When upgrading from jQuery mobile beta 2 to 3, I did not upgrade the corresponding images as well. Grabbing the updated images seems to have done the trick.

like image 196
Jon Avatar answered Dec 30 '25 15:12

Jon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!