1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What does "Disabler" class do (in radio html forms) ?

Discussion in 'XenForo Development Discussions' started by allewreK, Aug 8, 2013.

  1. allewreK

    allewreK Active Member

    Hello,

    When I see that code :
    HTML:
    <input type="radio" name="use_gravatar" value="0" class="Disabler radioOption" id="ctrl_useGravatar_0"{xen:checked '!{$visitor.gravatar}'} />
    
    I don't get the meaning of the "Disabler" class.

    Any ideas ?

    Regards.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    I'm sure you can guess :)

    It's from the avatar page, here: http://xenforo.com/community/account/avatar or indeed the avatar overlay.

    The use gravatar checkbox has the "Disabler" class and it disables the spajn that contains the text box below it when it is not checked.

    The accompanying code assigned to the span is an ID of: ctrl_use_gravatar_Disabler.

    The Disabler class - just like most class names or IDs that begin with a capital letter are usually nothing at all to do with Styling and instead used as jQuery selectors. They don't need to be capitalised, but when looking at the code it makes them easier to identify.
     

Share This Page