Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectmenu: list of options away from select #232

Closed
amacgyver opened this issue May 25, 2012 · 5 comments
Closed

Selectmenu: list of options away from select #232

amacgyver opened this issue May 25, 2012 · 5 comments

Comments

@amacgyver
Copy link

Hello,

my issue is the position of the list of options clicking the select: it appears at the top left of the page.
Using appendTo to insert the code in the same div of the select, the list appears at the top of the page ouside the div. Then assigning the style position:relative to this div the list appears on top of itself.
Maybe I'm not paying attention to something. Could you point me in the right direction?

Thanks

@fnagel
Copy link
Owner

fnagel commented May 25, 2012

Could you provide a stripped down demo fiddle? Its very easy, just take a
look here: #61

Why do you need to adjust the appendTo option? It should be used in very
specific situations only.
Checked the needed CSS?

@amacgyver
Copy link
Author

Thanks for your answer.
I can't reproduce this issue on jsfiddle because it doesn't happen there!!
I get a very strange problem... opening in the same browser (FF 12 or Chrome 19) the page (below added) sended by my development server (wamp) the list of options appears away from the select (at the top left corner of the page).

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" media="screen" href="http://github.felixnagel.com/selectmenu/themes/base/jquery.ui.core.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://github.felixnagel.com/selectmenu/themes/base/jquery.ui.theme.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://github.felixnagel.com/selectmenu/themes/base/jquery.ui.selectmenu.css" />
<script type="text/javascript" src="/js/frontend/jquery-1.7.2.js"></script>
<script type="text/javascript" src="/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="/js/jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="/js/jquery.ui.position.min.js"></script>
<script type="text/javascript" src="/js/jquery.ui.selectmenu.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('select#models').selectmenu({
width: 300,
style:'popup'
});
});
</script>

</head>
<body><br/><br/><br/><br/><br/><br/>
<div>
<label for="models">Select:</label>
<select name="models" id="models">
<option value = "A">A | A description</option>
<option value = "B">B | B description</option>
<option value = "C">C | C description</option>
<option value = "D">D | D description</option>
</select>
</div>

</body>
</html>

@fnagel
Copy link
Owner

fnagel commented May 25, 2012

Mhhh, seems to work for me. Would you mind to upload a demo zip? I need to
reproduce the problem in order to help!

And: please do not link to my server, save the files or get them at GitHub!

@amacgyver
Copy link
Author

Hi,
I found the cause of the problem, a my stupid mistake!
In the project in my development server I already was using the jquery ui slider. I added the file js ui position in not minified version but I linked the minified one. Strangely I never had errors from the console.
I'm sorry I wasted your time. Thanks again.

@fnagel
Copy link
Owner

fnagel commented May 25, 2012

No Problem. Im glad you found the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants