Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

addClass on Selectable adds class only to the ul

#452

I try to position the selectable but the class is only added to the child ul and not the parent div.
Therefore, it is not possible to position it properly.

Reported by Mathieu Simard · January 21st, 2011 @ 11:23 PM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. MadRabbit
    MadRabbit

    Hi Mathieu,

    When you deal with a single-option selectables and want to alter the whole thing, it will be simpler if you refer to the object.container property. I could re-tunnel all the dom methods to that property, but it might get confusing and ambiguous, because selectables handle both multiple and single-option cases and it makes sense when the actual object represents the list of options.

    Try it like that

    var selectable = new Selectable({mutliple:false});
    
    selectable.container.addClass('trololo');
    

    Btw, do you know that all UI widgets have their own classes? You could alter them directly in your css without adding any new ones.

    January 23rd, 2011 @ 06:35 PM

  2. Mathieu Simard
    Mathieu Simard

    I know I can modify the rui-selectable-container class.
    But my actual goal is to position two different selectables using two distinct css classes.
    At the moment I had just wrapped them in a div to which I added the positioning class.

    I'll add it to the container now that I know.

    January 24th, 2011 @ 05:33 PM

  3. MadRabbit
    MadRabbit
    • State changed from new to resolved

    January 24th, 2011 @ 05:55 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.