Git Product home page Git Product logo

Comments (4)

commadelimited avatar commadelimited commented on July 18, 2024

Could you provide some additional detail please @Slimicus? A code sample or demo URL would be ideal.

from jquery-mobile-icon-pack.

Slimicus avatar Slimicus commented on July 18, 2024

Sure thing, when I alter the original\index.html sample to this:

<a href="index.html" data-role="button" data-icon="arrow-l" class="ui-icon-alt">
    data-icon="arrow-l"
</a>

(notice the addition of class="ui-icon-alt")

This happens:

http://i.snag.gy/eaXQm.jpg

from jquery-mobile-icon-pack.

commadelimited avatar commadelimited commented on July 18, 2024

jQuery Mobile icons work on the concept of sprite sheets. That means all of the icons are contained within a single image, for faster loading. Since they're all in one image they're meant to be used within a single space around 20x20, with overflow set to hidden. This prevents them from doing exactly what's happening to you.

This image is a good illustration of how sprite sheets are meant to work. The image contains all of the icons, but only one is being used at a time, contained within the black box.

7263_11_31

So, long and short of it, you can't just apply that class to the anchor tag like you can with some of the other jQuery Mobile styles.

from jquery-mobile-icon-pack.

Slimicus avatar Slimicus commented on July 18, 2024

Ok, I just followed the example on the jqm site, I wasn't aware of any other way to use ui-alt-icon with an anchor tag in jqm?

http://jquerymobile.com/demos/1.3.0/docs/widgets/icons/#Blackvs.whiteiconsets

Their example shows just adding the class to the "<a"

from jquery-mobile-icon-pack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.