troubleshooting Question

drop down menu list custom

Avatar of metropia
metropiaFlag for United States of America asked on
JavaScriptjQuery
8 Comments1 Solution786 ViewsLast Modified:
hello,

i am using a free wordpress theme for the website i am working on.
there are a few customizations, and the them works very well on most browsers.

the theme comes with a css style sheet for when its displayed on a mobilde devide such as an iphone. this is a very nice feature of the theme.

there is only one issue that i have run into that i have not been able to work around using only css.

one of the menu items (music) when displayed on a regular computer screen, runs a javascript window open to display a music player on a new browser window.

the mobile version of the theme, converts the navigation menu to a drop down menu.

my problem is that when selecting the music page from the drop down menu, the page with the music player, does not open, because it does not execute the javascript for that page.

I would like to know if I could get help in adding some code that would make the drop down menu open the music page (player) when the music option gets chosen.

the javascript code that builds the drop down menu list is:

/*! http://tinynav.viljamis.com v1.03 by @viljamis */
(function(a,i,g)
{
	a.fn.tinyNav=function(j)
	{
		var c=a.extend(
		{
			active:"selected",header:!1
		},j);
			return this.each(function()
			{
				g++;
				var h=a(this),
				d="tinynav"+g,
				e=".l_"+d,
				b=a("<select/>").addClass("tinynav "+d);

				if(h.is("ul,ol"))
				{
					c.header&&b.append(a("<option/>").text("Navigation"));
					var f="";h.addClass("l_"+d).find("a").each(function()
					{
						f+='<option value="'+a(this).attr("href")+'">'+a(this).text()+"</option>"
					});
						b.append(f);
						c.header||b.find(":eq("+a(e+" li").index(a(e+" li."+c.active))+")").attr("selected",!0);
						b.change(function()
						{
							i.location.href=a(this).val()
						});
						a(e).after(b)
				}
			})
	}
})
(jQuery,this,0);

the javascript function that opens the music player when the music item is clicked from a regular computer screen is:
<script language="javascript">

function popUp(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,Left=2,top=91,width=460,height=200');");
}

</script>
from menu item:

<li id="menu-item-75" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-75"><a href="javascript:popUp('/zl-ck-page-player.html')">MUSIC</a></li>


this is the url to the website i am working on: http://catchkidcom.ipage.com

Thank you much for reading this question and for your help.

Best regards.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros