Daveo
Daveo

Reputation: 19882

jQuery Mobile/ jqTouch Image width

I want to have a static footer image with 5 buttons for navigation in my mobile phone website. The image is here http://www.pintum.com.au/jm/footer3a.jpg. The blue icons should be the default, the yellow icon should only be visible for the hover or active state.

I want to know how can I make this image scale to the correct width on all mobile devices (landscape and portrait) and have links to other pages and make the current/active pages icon the yellow color?

What I have tried so far


So whats the best/easiest way to do this?

Upvotes: 1

Views: 1437

Answers (1)

Daveo
Daveo

Reputation: 19882

Ok I figured it out

See soultion here http://jsbin.com/uraya5/10/ I had to:

  1. Set width to 19% of each button for some reason there is spacing between each button so 20% does not work.
  2. Set ui-bar-a background to black so it hides the spaces between my images
  3. Use this JS code to navigate pages $.mobile.changePage($("#about"), "flip", true, true);

I would still like to use a single image instead of having 5 different images to reduce http calls. So if anyone finds a eligant soultion for this please let me know.

Upvotes: 1

Related Questions