Chaitanya Lakshmi
  • About Me
    • Knowledge Blog
    • Linked In
    • Facebook
  • Static
  • PHP
  • Drupal
  • JAVA
  • Learning Tutorials
  • Contact Us
  • About Me
    • Knowledge Blog
    • Linked In
    • Facebook
  • Static
  • PHP
  • Drupal
  • JAVA
  • Learning Tutorials
  • Contact Us

How to find nth row of table using jQuery?

2/27/2012

0 Comments

 
$(document).ready(function(){
$(“table tr:eq(3)).css(“background”,”#000″);
}) ;

$(‘li:nth-child(1)’) selects the first
while $(‘li:eq(1)’) selects the second.

Because jQuery’s implementation of :nth-child(n) is strictly derived from the CSS specification, the value of n is “1-indexed”, meaning that the counting starts at 1. For all other selector expressions, however, jQuery follows JavaScript’s “0-indexed” counting.

0 Comments



Leave a Reply.

    Archives

    April 2012
    March 2012
    February 2012

    Categor

    All
    Ajax
    Api
    Cross Site Scripting
    Css
    Curl
    Design Patterns
    Drupal
    Exception Handling
    Htaccess
    Html
    Javascript
    Jquery
    Json
    Linux
    Mysql
    Oops
    Php
    Regular Expressions
    Web 2.0
    Webservices
    Wordpress
    Xhtml

    RSS Feed

Powered by Create your own unique website with customizable templates.