Today I was rewriting a piece of javascript code that was based on Prototype into a jQuery based script. It involved the creation of some elements and it seemed like jQuery is not as nifty as Prototype is for creating elements. After some research I found a great plugin, however it was not compatible with some browsers regarding the creation of input and select elements at runtime. Therefore I adjusted this script just a little to make it compatible. The jQuery plugin to create elements can be found here.
Feel free to use it and if you have any remarks on this piece code, feel free to share them in the comments.


You rule! Thank you for the IE compatible .create plugin update. It saves so much time and headaches. :)
It's a pleasure, hope you'll have lots of fun with it Oldboy.
Thanks a lot, dude… eliminiate IE bugs :)
I've rewrite your code because i get error when I set content of element as empty: just add additional condition:
line 71: if(arguments[2] && arguments[2] != '')
It may be useful…
Thanks, will make a change in the file, so future visitors will have better code :).
Thanks very much for the code. I'm using it in a project at http://code.google.com/p/jscom/. This plugin currently works, though there doesn't yet exist any documentation or examples.
The idea has been to manage all client/server communications in JSON, then have the client dynamically create the DOM. A complete separation of the logic an presentation layers, also reducing server CPU needs and allowing complete template control. I'll give an update once a live demo is available.