JQuery and Element Objects
Part of the switch I'm making includes prototypejs to JQuery. No, not like I've found anything lacking in prototype. It's just about the change.
JQuery doesn't seem to work with core element objects. I will explain. Take a look at the sample code:
This will output something like object HTMLParagraphElement. This is what I'm referring to as the core element object. And you can't use this directly in JQuery. This won't work:
It will in prototype though:
Thing is, it is necessary to convert any element object to JQuery's object with $(). So this will work:
The knowledge of this simple thing, can save a lot of headache.