$(function(){
    var z = document.body.children[0];
    var x=$("li", z);
    x.name="Johnny";
    alert(x.prop(name));
});
- xshould be an object containing all the elements within the first- ulin the- body. Regardless of what the object contains, I would like to add a property with a value, and then use the- prop()method to show it - but that doesn't seem to work. Why is that?
- I saw a script containing the following: - var $x = $("div");- Do I have to add- $to the variable name if it's a jQuery object?
 
     
     
     
     
    