I added a getTagfunction.
Also fixed an error in webkit browsers for dropdown lists

function getTag(name){
var dump = $(document.html).outerHTML,
regex = new RegExp('<'+name+'[^>]*>','im'),
match = regex.exec(dump);

return match[0];
}

as you can see getTag uses the outerHTML property and grabs the full text of the tag directly. I believe outerHTML was recently added to the latest version of FireFox, so if you are a version back it wont work. I'll add a error trap there and the only thing I can think of is just to return the tag as <html>.

This hasnt been tested cross browser yet

The url is: http://jsfiddle.net/hazlema/BwczU/35/ haven't made it the base yet because it isn't tested.

as for a doctype decleration, I have looked into this and can find no way that will work with every doctype.

Remember, IE will throw a fit and give you an error with this demo, its just the blasted iframe though, the script works.

Reply via email to