// creates a new, empty jQueru object $( // create a new jQuery object using virtual-sensor // as the selector, with 'data' as the context // and it returns the ith record in that query into // an array. $("virtual-sensor",data).get(i) // this gets all records that have an attribute of name ).attr("name");
The problem is that this code will never work as written. The author is trying to Use 'virtual-sensor' as a selector, but in this setup, they're acting as if it's an HTML tag, which it's not. It should be '.virtual-sensor' or '#virtual-sensor' andy -----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of charliend Sent: Tuesday, October 16, 2007 9:05 AM To: jQuery (English) Subject: [jQuery] Can't understand a Jquery statement Hello all, I'm beginning working on a project which has been writing using Jquery (I'm novice) and I really can't understand that line: $($("virtual-sensor",data).get(i)).attr("name"); Can you traduce it to me? Thank you Charlie