Styling drop-down menu with jQuery (link vs style problem)
Hi,
I am very new to jQuery (5 hours use).
What I am trying to do is to style a drop-down box.
Here is the code:
Part 1
- <script type="text/javascript">
$(document).ready(function() {
$('#Items').selectbox();
});
</script>
Part 2
- <div id="menu" >
<select name="Items" id="Items">
<option onClick="window.location='index.php'">Index</option>
</select>
</div>
Part 3 CSS
- div.selectbox-wrapper ul {
list-style-type:none;
margin:0px;
padding:0px;
}
div.selectbox-wrapper ul li.selected {
background-color: #EAF2FB;
}
div.selectbox-wrapper ul li.current {
background-color: #CDD8E4;
}
div.selectbox-wrapper ul li {
list-style-type:none;
display:block;
margin:0;
padding:2px;
cursor:pointer;
}
.selectbox
{
margin: 0px 5px 10px 0px;
padding-left:2px;
font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size:.5em;
width : 190px;
display : block;
text-align:left;
background: url('bg_select.png') right;
cursor: pointer;
border:1px solid #D1E4F6;
color:#333;
}
So the styling part works great but at this point my link does not work.
When i change #Items in part one to anything else, my links work but styling does not.
Of coursei am including two more files in this. (if it would help I can post them here but from what I see this has to do with the way CSS is being used with jQuery.)
Thank you
M.