...

View Full Version : selectbox problem



mmchu
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:


<?php
$items = wp_get_nav_menu_items('tags-menu');
//var_dump($items);
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>
</select>

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:
https://github.com/claviska/jquery-selectBox/blob/master/jquery.selectBox.js

Need some help with this, thanks :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum