Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>$.each($(".gridTable tr:not(.gridTitleRow, .gridSpan)"), function(a, b){}); </code></pre> <p>In selectors, the "," is like "or". <strike>Wait - it's like "and", but because your selector here is in a "not()" clause, it's "not this one and not that one", which is like "not (this one or that one)".</strike> I think I may belabor the point a bit :-)</p> <p><em>edit</em> &mdash; no I convinced myself it's "or" again. Need coffee.</p> <p><em>edit again</em> &mdash; a couple things:</p> <ul> <li><p>There's no reason to call "$.each()" when the first object is already a jQuery object:</p> <pre><code>$(".gridTable tr:not(.gridTitleRow, .gridSpan)").each(function(i, elem) { </code></pre></li> <li><p>When searching by "id" value, there's no reason to use an attribute selector, and there's no reason to use a context because "id" values <strong>must be unique</strong>. Use "#id":</p> <pre><code>var order = $('#index'); </code></pre></li> <li><p>Please note again that it is <strong>invalid</strong> to use the same "id" value for multiple elements on a page. If you're using the same "id" on many table rows, that is wrong and you'll have to change it.</p></li> <li><p>The jQuery team has deprecated the form <code>$(selector, base)</code> and prefer the form <code>$(base).find(selector)</code>. Internally, the library always performs that transformation, so you might as well save it the trouble:</p> <pre><code>var deleteRow = $(b).find('#deleteCb'); </code></pre></li> <li><p>It's not at all clear what "flag" is supposed to do, but you may have forgotten to declare it. Maybe it's a global variable.</p></li> <li><p>Your comment says that "empty tr is passing with undefined", but I do not know what that means. If the selector finds no <code>&lt;tr&gt;</code> elements, the "each" loop will simply not happen. If you describe what exactly it is that's undefined, it might be possible to help.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload