Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How to use different styles in uniform plugin?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42307
    AlirezaM
    Participant

    Hello to everyone!

    I’m using jquery uniform plugin to create stylish form elements.

    http://uniformjs.com

    It has one spritesheet and calls every elements’ style from that.

    the problem I have is I want to create more than 1 style for every element and use them.

    for example :

    div.radio is for styling radio buttons but I want to have more styles for radios like:

    div.radio1 ,

    div.radio2

    and …

    Now how should I create that?

    I am really in need of doing this, Please help!

    Thanks in advance !

    Alireza.M

    #122609
    rosspenman
    Participant

    You could use the CSS `:nth-of-type()` selector, but note that it only works in modern browsers:

    div.radio:nth-of-type(1) {
    // Specific styling for the first radio.
    }

    #122804
    AlirezaM
    Participant

    How can I use another classes?

    Is it possible to change javascript file to calls different css classes?

    #123147
    AlirezaM
    Participant

    I tried different ways but as I want it to work in all browsers I couldn’t make it work.

    I’ll apperciate if anyone help to get what is in my mind.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.