IE 7 does not like jquery('<button/>').attr('type','button')
Posted
by salmane
on Stack Overflow
See other posts from Stack Overflow
or by salmane
Published on 2010-05-09T19:49:28Z
Indexed on
2010/05/09
19:58 UTC
Read the original article
Hit count: 212
jQuery
|internet-explorer
I am trying to create a button using jquery. I use the following code
jquery('<button/>', {type:'button'}).text(name)
However this works in Safari , FF IE8 but not IE7
i tried to use the attr function :
jquery('<button/>').attr('type','button').text(name)
this does not work either.
any ideas what would work? I suppose if I don't assign a type it would default to button but i rather do that
thanks for your help
© Stack Overflow or respective owner