View Single Post
Old 05-18-2012, 06:24 PM   PM User | #1
mmchu
New to the CF scene

 
Join Date: May 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mmchu is an unknown quantity at this point
Arrow selectbox problem

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 Code:
<?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:

Code:
<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-s...y.selectBox.js

Need some help with this, thanks
mmchu is offline   Reply With Quote