PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Advanced styling with jquery?

  1. Hi,
    I'd like to do some advanced styling. If you have a look at http://uniformjs.com/, this is one solution for what I'd like to do. But - it seems uniform.js needs the class to be added to the input item itself, like this:

    <li id="field_1_3" class="gfield gfield_contains_required">
    <label class="gfield_label" for="input_1_3">
    Tele­fon­num­mer
    <span class="gfield_required">*</span>
    </label>
    <div class="ginput_container">
    <input id="input_1_3" class="medium uniform" type="text" tabindex="5" value="" name="input_3">
    </div>
    </li>

    But if I use the css class option in the advanced tab, what I get is this - the class name is added to the list item, like this:

    <li id="field_1_3" class="gfield gfield_contains_required">
    <label class="gfield_label" for="input_1_3">
    Tele­fon­num­mer
    <span class="gfield_required">*</span>
    </label>
    <div class="ginput_container">
    <input id="input_1_3" class="medium" type="text" tabindex="5" value="" name="input_3">
    </div>
    </li>

    Any tips on how to solve this? I can probably use just about any of the many form-styling-jquery-solutions out there if that would solve it.

    Posted 13 years ago on Wednesday November 2, 2011 | Permalink
  2. Hi Torsteino,

    I believe you should be able to target the fields to initialize this script like so:

    [js]
    $('.uniform select, .uniform input').uniform();

    With this method, adding the "uniform" class to the fields would still allow you to target the inputs, selects, etc. that field contains.

    Posted 13 years ago on Wednesday November 2, 2011 | Permalink