How do I prevent a jQuery Selector from including nested elements?


I'm new to jQuery so hopefully there is an easy answer to this.

I have html similar to:

<table id="dataTable">
    <tr> <!-- I want this row -->
               <tr> <!-- I do not want this row -->

I am using jQuery similar to this:

$("#dataTable tr").length;

I would expect length to equal 2, but its returning 3 (includes the <tr> in the nested table.) My question is: How do I prevent the 3rd <tr> from being selected?

I know that I could add an ignorethisrow class to the last row and exclude that from my results, but I'd prefer an option that allows me to control the depth that the select engine searches.

By : CodeChef


I believe the syntax:

$("#dataTable > tr").length

mean "just tr's on the next level".

JasperReports uses the Jakarta Commons Logging API. Commons Logging has a discovery mechanism that connects to logging API you are using in your project.

You need to configure logger named "net.sf.jasperreports" in your logging configuration file to control the logging level of JasperReports.

If you are using Log4j, you can read this section of there documentation for exact details.

For example you may write something like this in file, Daily

Where "Daily" is name of an appender configured in same properties file.

If you're using Ms SQL you can use sql profiler, to see every query executed on the server.

EDIT: Here is an article on enabling sql query logging on MySql server:

This video can help you solving your question :)
By: admin