I am looking to select columns 2-4 in the second row of the table. Does jquery have any "and" functions in its selectors? Or did I need to do something like this?
$('#id tr:eq(1)').find('td:lt(5)').find('td:gt(1)')
I have not tried this, but theoretically it should work:
$('#id tr:eq(1) td:lt(5):gt(1)')
. slice () works well
$('#tableId tr').eq(1).find('td').slice(1,4); //2nd row, 2nd-4th td $('#tableId tr').slice(1,5); // get specific rows $('#tableId td').slice(1,4) // get specific columns $('#tableId tr').each(function() { // do code per row var $columnRange = $(this).find('td').splice(1,4); });
Source: https://habr.com/ru/post/1746888/More articles:How to create an XML literal string using Objective-C? - xmlImplementing AES-XTS in C # - c #XTS-AES mode in C # - c #Is Maven a tool that I want to use if I am building a non-web application? - javaHow to convert this XML to KML? - jqueryCakePHP Overload? - cakephpCan Visual Studio 2010 Test.net 3.5 SP1 projects? - .netcompare brush and color - c #Do I need to get rid of MySqlCommand? - mysqlUsing Memcached in Python / Django - questions - pythonAll Articles