View Full Version : selectbox problem

05-18-2012, 07:24 PM
Hi there, i'm new in the forum and need some help.
I'm using wordpress to make my website but i have a problem..
I'm making a tags-menu in wordpress and call it in php with this function:

$items = wp_get_nav_menu_items('tags-menu');
echo "<select id='designfields' name='designfields'>";
foreach ($items as $list){
if($list->menu_item_parent != "0"){
echo "<option value=".$list->url.">&nbsp; &nbsp;".$list->title."</option>";
else {
echo "<option value=".$list->url.">".$list->title."</option>";

echo "</select>";

this give me what i want:

<select id='designfields' name='designfields'>
<option value=http://myweb.com.ar/portfolio/>All Fields</option>
<option value=http://myweb.com.ar/tag/branding/>Branding</option>
<option value=http://myweb.com.ar/tag/print-design/>Print Design</option>
<option value=http://myweb.com.ar/tag/web-design/>Web Design</option>
<option value=http://myweb.com.ar/tag/ui-design/>UI Design</option>
<option value=http://myweb.com.ar/tag/motion-graphics/>Motion Graphics</option>
<option value=http://myweb.com.ar/tag/illustration/>Illustration</option>

I want to style this with css so i use the plugin jquery.selectbox, but when i style my menu with this plugin i lose the functionality, i need to convert this optionvalues in links like function onChange (a jumpmenu). so i think the problem is in the jquery.selectbox.js in some place must transform optionvalue in link.

Here is the jquery.selectbox im using:

Need some help with this, thanks :)