>> We need to make a list of "stupid problem areas in
>> JavaScript/HTML/CSS". We can then check off the ones that we've solved
>> (such as appending HTML <tr>..</tr> to a table) and ones that we
>> haven't (animating the height of table rows, appending  HTML <option>
>> to a <select>, etc.). In fact, here's a wiki page for it:
>> http://jquery.com/docs/HardProblems/
> 
> Ohhh ... I've been wanting to solve that IE options issue for a while
> now. So much fun and so little time. :)
> 
>> Let's flush this out!
> 
> --
> Brandon Aaron
> 
> 

i ran into that 'options as html failure in ie' recently and found i could
add them 
to a temp select, append that to the document, and then appendTo the
original select. 
i imagine there's some nicer code to do this with, but here's what worked
for me:
(only tested in ie6 and ff1.5 on xp)

$.fn.addoptionhtml = function(str){
        str = '<select id="tempselect">' + str + '</select>'
        $(this).append(str);
        $('#tempselect')[0] = new Option($(str).find('option'));
        $('#tempselect option').appendTo(this);
        $('#tempselect').remove();
}

$("#myselect").addoptionhtml('<option value="1">one</option><option
value="2">two</option>')
-- 
View this message in context: 
http://www.nabble.com/Possible-changes-to-hide-show-tf2439490.html#a6815092
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to