Loading ...
Sorry, an error occurred while loading the content.

Re: jquery conditional css gives: Weird ternary.

Expand Messages
  • bartman1c
    ... Is not weird anymore, thank you.
    Message 1 of 3 , Oct 2, 2012
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "bartman1c" <bartman1c@> wrote:
      > >
      > > /*global $ */
      > > var $my_element = $('#myelementid'), $element_a = $('#elementaid'), $element_b = $('#elementbid');
      > > $my_element.css(
      > > $element_a.width() + $element_b.width() > $my_element.parent().width() ? {'top': '18px', 'width': '63'} : {'top': '5px', 'width': 'auto'}
      > > );
      > >
      > > Not sure if it is jslint issue, what would be the "not weird" alternative?
      >
      >
      > Thanks. Please try it now.
      >

      Is not weird anymore, thank you.
    Your message has been successfully submitted and would be delivered to recipients shortly.