Skip to main content

Bug Tracker

Side navigation

#12210 closed bug (invalid)

Opened August 07, 2012 09:59AM UTC

Closed August 07, 2012 03:14PM UTC

BUG IN DYNAMICALLY CREATING SELECT INPUT TYPE USING JQUERY MOBILE

Reported by: mgsriram90@gmail.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

Am using jquery mobile V 1.0b2 and jquery V 1.6.2 . and here is my problem while am developing,

I'm creating a select Options dynamically under a div tag using jquery. I have set the first item as selected using selected attribute. But i couldn't able to see the text for first item in select list. if i select second or third item its showing the text in select list. In order to get first item's text in select box, i need to select other than first item before. after that i need to select the first item.

If i remove jquery mobile script link in HTML document its working perfectly.

and my HTML code :

<select id="HRselectList"></select>

my Js code :

for(var x = 0; x <= 5; x++)
{
  $('#HRselectList').append($("<option></option>").attr("value",x).text(x));
  if(x==0)
  {
    $('#HRselectList option').attr("selected","selected");
  }
}

For more, stackoverflow page for my question : http://stackoverflow.com/questions/11778455/need-help-in-dynamically-created-select-option-tag-using-jqueryfor-jquery-mobil

Attachments (0)
Change History (1)

Changed August 07, 2012 03:14PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

It seems like you already chose the correct forum, StackOverflow. You're asking about older versions and not reporting a bug here.