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

Double Indentation

Expand Messages
  • Erik Eckhardt
    I turned on strict whitespace and jslint is telling me that the section starting with `position: absolute ` should be have one fewer tab stops. This is using
    Message 1 of 5 , Apr 4, 2011
    • 0 Attachment
      I turned on strict whitespace and jslint is telling me that the section
      starting with `position: 'absolute'` should be have one fewer tab stops.
      This is using jQuery:

      var i = $('<p></p>')

      .css({width: '100%', height: '200px'}),

      o = $('<div></div>')

      .css({

      position: 'absolute',

      top: '0',

      left: '0',

      visibility: 'hidden',

      width: '200px',

      height: '150px',

      overflow: 'hidden'

      }),

      w1,

      h1,

      w2,

      h2;

      Does my indentation need improvement or does the way I've done it make
      sense?

      Erik


      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... Please try it now.
      Message 2 of 5 , Apr 5, 2011
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, Erik Eckhardt <erik@...> wrote:
        >
        > I turned on strict whitespace and jslint is telling me that the section
        > starting with `position: 'absolute'` should be have one fewer tab stops.
        > This is using jQuery:
        >
        > var i = $('<p></p>')
        >
        > .css({width: '100%', height: '200px'}),
        >
        > o = $('<div></div>')
        >
        > .css({
        >
        > position: 'absolute',
        >
        > top: '0',
        >
        > left: '0',
        >
        > visibility: 'hidden',
        >
        > width: '200px',
        >
        > height: '150px',
        >
        > overflow: 'hidden'
        >
        > }),
        >
        > w1,
        >
        > h1,
        >
        > w2,
        >
        > h2;

        Please try it now.
      • Erik Eckhardt
        I m still getting complaints about the same line. I think I ve got the spaces down now so you can see it properly. Sorry about last time. - Problem at line 5
        Message 3 of 5 , Apr 5, 2011
        • 0 Attachment
          I'm still getting complaints about the same line. I think I've got the
          spaces down now so you can see it properly. Sorry about last time.

          -> Problem at line 5 character 10: Expected 'position' at column 7, not
          column 10.

          var i = $('<p></p>')
          .css({width: '100%', height: '200px'}),
          o = $('<div></div>')
          .css({
          position: 'absolute',
          top: '0',
          left: '0',
          visibility: 'hidden',
          width: '200px',
          height: '150px',
          overflow: 'hidden'
          }),
          w1,
          h1,
          w2,
          h2;

          If the indentation is still not visible, let me try it this way:

          var i = $('<p></p>')

          .css({width: '100%', height: '200px'}),

          o = $('<div></div>')

          .css({

          position: 'absolute',

          top: '0',

          left: '0',

          visibility: 'hidden',

          width: '200px',

          height: '150px',

          overflow: 'hidden'

          }),

          w1,

          h1,

          w2,

          h2;



          On Tue, Apr 5, 2011 at 4:18 AM, Douglas Crockford <douglas@...>wrote:

          >
          >
          > --- In jslint_com@yahoogroups.com, Erik Eckhardt <erik@...> wrote:
          > >
          > > I turned on strict whitespace and jslint is telling me that the section
          > > starting with `position: 'absolute'` should be have one fewer tab stops.
          > > This is using jQuery:
          > >
          >
          > Please try it now.
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Douglas Crockford
          ... Are you sure? This checks out for me: var z, ````i2 = $( ) ````````.css({ ````````````width: 100% , ````````````height: 200px ````````})
          Message 4 of 5 , Apr 6, 2011
          • 0 Attachment
            --- In jslint_com@yahoogroups.com, Erik Eckhardt <erik@...> wrote:
            >
            > I'm still getting complaints about the same line.

            Are you sure? This checks out for me:

            var z,
            ````i2 = $('<div></div>')
            ````````.css({
            ````````````width: '100%',
            ````````````height: '200px'
            ````````})
            ````````.append($('<p></p>'))
            ````````.css({
            ````````````color: 'blue'
            ````````}),
            ````x,
            ````y;

            (It is terribly difficult to discuss indentation using Yahoo Groups.)
          • Erik Eckhardt
            I am incredibly sorry. I think I failed to refresh my browser after you made changes recently. It works perfectly now. Thank you for taking the time to look
            Message 5 of 5 , Apr 6, 2011
            • 0 Attachment
              I am incredibly sorry. I think I failed to refresh my browser after you made
              changes recently. It works perfectly now.

              Thank you for taking the time to look into this and try it out just to help
              me fix my silly head...

              Erik

              On Wed, Apr 6, 2011 at 9:51 AM, Douglas Crockford <douglas@...>wrote:

              >
              >
              > --- In jslint_com@yahoogroups.com, Erik Eckhardt <erik@...> wrote:
              > >
              > > I'm still getting complaints about the same line.
              >
              > Are you sure? This checks out for me:
              >
              > var z,
              > ````i2 = $('<div></div>')
              > ````````.css({
              > ````````````width: '100%',
              > ````````````height: '200px'
              > ````````})
              > ````````.append($('<p></p>'))
              > ````````.css({
              > ````````````color: 'blue'
              > ````````}),
              > ````x,
              > ````y;
              >
              > (It is terribly difficult to discuss indentation using Yahoo Groups.)
              >
              >
              >


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.