jQuery UI Widgets Forums Lists DropDownList How can I use instead of in dropdown list

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • ashutosh1306
    Participant

    Hi,

    I would like to use multiple dropdown lists in single line. To do so, I want to use <span></span> tag instead of <div></div> tag.
    However, when I replace <div> with <span> the CSS of the dropdown list is lost.

    This is code as per demo –

    $(document).ready(function () {
    var source1 = [
    “Select”,
    “Value 1”,
    “Value 2”,
    “Value 3”
    ];

    // Create a jqxDropDownList – Labor Union
    $(“#div1”).jqxDropDownList({ source: source1 , selectedIndex: 0, width: ‘200’, height: ’25’ });

    var source2 = [
    “Select Year”,
    “2014”,
    “2015”
    ];

    // Create a jqxDropDownList – Year
    $(“#div2”).jqxDropDownList({ source: source2 , selectedIndex: 0, width: ‘200’, height: ’25’ });

    });
    <div id=’div1′>
    </div>
    <div id=’div2′>
    </div>

    This is what I am trying to achieve –

    $(document).ready(function () {
    var source1 = [
    “Select”,
    “Value 1”,
    “Value 2”,
    “Value 3”
    ];

    // Create a jqxDropDownList – Labor Union
    $(“#div1”).jqxDropDownList({ source: source1 , selectedIndex: 0, width: ‘200’, height: ’25’ });

    var source2 = [
    “Select Year”,
    “2014”,
    “2015”
    ];

    // Create a jqxDropDownList – Year
    $(“#div2”).jqxDropDownList({ source: source2 , selectedIndex: 0, width: ‘200’, height: ’25’ });

    });
    <span id=’div1′>
    </span>
    <span id=’div2′>
    </span>

    Please let me know if there is any other way around to achieve this kind of behavior.

    Thanks,
    Ashutosh Pujari.


    Peter Stoev
    Keymaster

    Hi Ashutosh Pujari,

    You cannot use SPAN tag instead of DIV tag to create the widget. I do not see a reason why you would want to do that, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.