Can I convert the selected items in a form to Custom Objects in JQuery?.
A:
If you wrap any HTML element expression in $() it becomes jQuery friendly, and you can call the jQuery API methods and properties on it. For example,
var el = document.getElementById('inputText');
referring to an HTML element in the DOM can be turned into
$(el)
to become a jQuery object. You can use jQuery members on it like Manipulation methods and Attribute members, like setting the value:
$(el).val('hi'); // assign a value to the input field
View the jQuery Selectors documentation to know the various ways to specify elements in the DOM to turn into jQueryable objects. For example var allInputs = $(":input");
to get a set of all input fields on your form so you can manipulate them all at once.
I'm trying to guess the direction of your question and hope this helps. My mind-reading skills are sometimes better than at other times!
John K
2009-10-23 20:49:36