jQuery UI Widgets › Forums › General Discussions › Lists › DropDownList › How can I use instead of in dropdown list
Tagged: dropdownlist component
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 11 years ago.
-
Author
-
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.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 StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.