Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
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
Reply

Bookmarks

Tags
jquery, jumpmenu, onchange, problem, selectbox

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:28 AM.


Advertisement
Log in to turn off these ads.