Jump to content


- - - - -

Dropdown Menus not working


  • Please log in to reply
8 replies to this topic

#1 Gurlz and Guyz with Gunz

Gurlz and Guyz with Gunz

    Novice

  • Members
  • PipPip
  • 5 posts
  • Real Name:Cody
  • IPB Version:v3.1.x

Posted 05 December 2011 - 03:21 AM

Hello,

I am i dire need of some help. I am trying to add in 3 drop down menus to my site in the header. I previously had 2 dropdown menus in it and as soon as I add in the third one, the original two stopped working. Could someone please take a look at the code below and see if they can find the issue? I am lost.

Thanks in advance!

<!-- Dropdown Menu Starts -->
					  				<li id="dropdown_1" class="left"><span><a href="#" style="padding-bottom:2px;"><img src="{style_images_url}/_custom/icon_primary_members.png" /><br />Members <img src="{style_images_url}/_custom/dropdown_arrow.png" class="sb-dropdown_arrow" /></a></span>
							<ul>
							<li><a href="http://www.gurlzandguyzwithgunz.com/index.php?/members/" title="Members"><img src="{style_images_url}/_custom/icon_primary_members.png" alt="Members" /> Go To Members List</a></li>
							<li><a href="http://www.gurlzandguyzwithgunz.com/index.php?app=ccs&module=pages&section=pages&folder=/Members/Roster&id=5" title="Roster"><img src="{style_images_url}/_custom/icon_primary_members.png" alt="Roster" /> Go To Roster</a></li>
							</ul>
						</li>
						<!-- Dropdown Menu Ends -->

						<!-- Dropdown Menu Starts -->
					  				<li id="dropdown_1" class="left"><span><a href="#" style="padding-bottom:2px;"><img src="{style_images_url}/_custom/icon_primary_more.png" /><br />Media <img src="{style_images_url}/_custom/dropdown_arrow.png" class="sb-dropdown_arrow" /></a></span>
							<ul>
							<li><a href="http://www.twitter.com/username" title="COMING SOON!"><img src="{style_images_url}/_custom/icon-social_twitter.png" alt="Twitter" /> Follow Us on Twitter</a></li>
							<li><a href="http://www.facebook.com/G.G.w.G.360" title="Facebook"><img src="{style_images_url}/_custom/icon-social_facebook.png" alt="Facebook" /> Like Us on Facebook</a></li>
							<li><a href="https://elite.callofduty.com/connect/clan/view/205784" title="Call of Duty ELITE"><img src="{style_images_url}/_custom/ELITE.png" alt="ELITE" /> Join us on ELITE!</a></li>
							<li><a href="http://www.gurlzandguyzwithgunz.com/index.php?app=tinychat" title="GGG Chat"><img src="http://www.gurlzandguyzwithgunz.com/admin/applications_addon/other/tinychat/skin_cp/appIcon.png" alt="Youtube" /> Join us in Chat!</a></li>
							</ul>
						</li>
						<!-- Dropdown Menu Ends -->
												<!-- Dropdown Menu Starts -->
					  				<li id="dropdown_1" class="left"><span><a href="#" style="padding-bottom:2px;"><img src="{style_images_url}/_custom/icon_primary_more.png" /><br />Maps <img src="{style_images_url}/_custom/dropdown_arrow.png" class="sb-dropdown_arrow" /></a></span>
							<ul>
						<li><a href="" title="COMING SOON!"><img src="{style_images_url}/_custom/icon_primary_more.png" alt="Twitter" /> COMING SOON</a></li>
							</ul>
						</li>
						<!-- Dropdown Menu Ends -->


Full Code (Header Nav Bar):

				<div id='primary_nav'>
					<ul>
						<if test="showhomeurl:|:$this->settings['home_url']">
							<li id='nav_home' class='left'><a href='{$this->settings['home_url']}' title='{$this->lang->words['homepage_title']}' rel="home"><img src="{style_images_url}/_custom/icon_primary_home.png" /><br />{$this->settings['home_name']}</a></li>
						</if>
						{parse variable="forumActive" default="" oncondition="IPS_APP_COMPONENT == 'forums'" value="active"}
						{parse variable="helpActive" default="" oncondition="IPS_APP_COMPONENT == 'core' AND $this->request['module'] == 'help'" value="active"}
						<if test="!ipsRegistry::$applications['forums']['app_hide_tab']"><li id='nav_discussion' class='left {parse variable="forumActive"}'><a href='{parse url="act=idx" seotitle="false" base="public"}' title='{$this->lang->words['go_to_discussion']}'><img src="{style_images_url}/_custom/icon_primary_forums.png" /><br />{$this->lang->words['discussion']}</a></li></if>
	
						<if test="applicationsloop:|:is_array($header_items['applications']) AND count($header_items['applications'])">
							<foreach loop="applications:$header_items['applications'] as $data">
								<if test="showingapp:|:$data['app_show']">
									{parse variable="appActive" default="" oncondition="$data['app_active']" value="active"}
									<li id='nav_app_{$data['app_dir']}' class="left {parse variable="appActive"}"><a href='{parse url="{$data['app_link']}" seotitle="false" base="public"}' title='{parse expression="sprintf( $this->lang->words['go_to_prefix'], IPSLib::getAppTitle($data['app_dir']) )"}'><img src="{style_images_url}/_custom/icon_primary_{$data['app_dir']}.png" /><br />{IPSLib::getAppTitle($data['app_dir'])}</a></li>
								</if>
							</foreach>
						</if>
												<!-- Dropdown Menu Starts -->
					  				<li id="dropdown_1" class="left"><span><a href="#" style="padding-bottom:2px;"><img src="{style_images_url}/_custom/icon_primary_members.png" /><br />Members <img src="{style_images_url}/_custom/dropdown_arrow.png" class="sb-dropdown_arrow" /></a></span>
							<ul>
							<li><a href="http://www.gurlzandguyzwithgunz.com/index.php?/members/" title="Members"><img src="{style_images_url}/_custom/icon_primary_members.png" alt="Members" /> Go To Members List</a></li>
							<li><a href="http://www.gurlzandguyzwithgunz.com/index.php?app=ccs&module=pages&section=pages&folder=/Members/Roster&id=5" title="Roster"><img src="{style_images_url}/_custom/icon_primary_members.png" alt="Roster" /> Go To Roster</a></li>
							</ul>
						</li>
						<!-- Dropdown Menu Ends -->

						<!-- Dropdown Menu Starts -->
					  				<li id="dropdown_1" class="left"><span><a href="#" style="padding-bottom:2px;"><img src="{style_images_url}/_custom/icon_primary_more.png" /><br />Media <img src="{style_images_url}/_custom/dropdown_arrow.png" class="sb-dropdown_arrow" /></a></span>
							<ul>
							<li><a href="http://www.twitter.com/username" title="COMING SOON!"><img src="{style_images_url}/_custom/icon-social_twitter.png" alt="Twitter" /> Follow Us on Twitter</a></li>
							<li><a href="http://www.facebook.com/G.G.w.G.360" title="Facebook"><img src="{style_images_url}/_custom/icon-social_facebook.png" alt="Facebook" /> Like Us on Facebook</a></li>
							<li><a href="https://elite.callofduty.com/connect/clan/view/205784" title="Call of Duty ELITE"><img src="{style_images_url}/_custom/ELITE.png" alt="ELITE" /> Join us on ELITE!</a></li>
							<li><a href="http://www.gurlzandguyzwithgunz.com/index.php?app=tinychat" title="GGG Chat"><img src="http://www.gurlzandguyzwithgunz.com/admin/applications_addon/other/tinychat/skin_cp/appIcon.png" alt="Youtube" /> Join us in Chat!</a></li>
							</ul>
						</li>
						<!-- Dropdown Menu Ends -->
												<!-- Dropdown Menu Starts -->
					  				<li id="dropdown_1" class="left"><span><a href="#" style="padding-bottom:2px;"><img src="{style_images_url}/_custom/icon_primary_more.png" /><br />Maps <img src="{style_images_url}/_custom/dropdown_arrow.png" class="sb-dropdown_arrow" /></a></span>
							<ul>
						<li><a href="" title="COMING SOON!"><img src="{style_images_url}/_custom/icon_primary_more.png" alt="Twitter" /> COMING SOON</a></li>
							</ul>
						</li>
						<!-- Dropdown Menu Ends -->
					</ul>
				</div>
				<div class="clear"></div>
				</div></div></div>


#2 AndyF

AndyF

    Cogito ergo sum

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 8,414 posts
  • Location:Derby, UK
  • Real Name:Andy
  • IPB Version:v3.2.x
Contributor

Posted 06 December 2011 - 10:22 AM

This is a Design related issue, moving to the proper forum.

View my tutorials

Please do NOT pm me with support related questions unless requested.
If you are in need of help or assistance, please post on the forum in the appropriate section!



A Look Back - 1.0.1 - 1.3.1 - 2.0.0 - 2.1.7 - 2.2.0 - 2.3.6

#3 Bitter

Bitter

    Final Prestige, LLC Owner

  • Support Staff
  • PipPipPipPipPipPipPipPipPipPip
  • 2,687 posts
  • Location:Connecticut
  • Real Name:Dustin Schriffert
  • IPB Version:v3.3.x

Posted 09 December 2011 - 05:09 PM

The only thing I can think of since I'm not too good with JavaScript is that the JS is only concentrating on one part where it is used. You'll need to customize the JS so that it recognizes there are multiple mentions that all need to work individually as their own dropdowns.

Posted Image


#4 Gurlz and Guyz with Gunz

Gurlz and Guyz with Gunz

    Novice

  • Members
  • PipPip
  • 5 posts
  • Real Name:Cody
  • IPB Version:v3.1.x

Posted 11 December 2011 - 03:24 AM

Thanks for the advice.

Any ideas on how to do that? I am not all that great with JS either. :s

#5 Bitter

Bitter

    Final Prestige, LLC Owner

  • Support Staff
  • PipPipPipPipPipPipPipPipPipPip
  • 2,687 posts
  • Location:Connecticut
  • Real Name:Dustin Schriffert
  • IPB Version:v3.3.x

Posted 13 December 2011 - 02:35 AM

I wish I knew. I had to have Alex Hobbs help me out in my situation. He knew JavaScript way better than I did. Don't know if he's available. He has been pretty busy lately and I haven't gotten in touch with him. But I  could be wrong about what the cause is for your problem. Hopefully someone else that is more familiar will see this post.

Posted Image


#6 Gurlz and Guyz with Gunz

Gurlz and Guyz with Gunz

    Novice

  • Members
  • PipPip
  • 5 posts
  • Real Name:Cody
  • IPB Version:v3.1.x

Posted 20 December 2011 - 01:26 AM

Thanks. Hopefully someone will be able to give me some tips. :P

#7 KaneMods

KaneMods

    Novice

  • Members
  • PipPip
  • 14 posts
  • Real Name:Kane
  • IPB Version:v3.2.x

Posted 20 December 2011 - 02:28 AM

Where is the javascript?

#8 Gurlz and Guyz with Gunz

Gurlz and Guyz with Gunz

    Novice

  • Members
  • PipPip
  • 5 posts
  • Real Name:Cody
  • IPB Version:v3.1.x

Posted 30 December 2011 - 02:30 AM

No idea... as I said... I am lost as what to do. lol

#9 KaneMods

KaneMods

    Novice

  • Members
  • PipPip
  • 14 posts
  • Real Name:Kane
  • IPB Version:v3.2.x

Posted 30 December 2011 - 05:01 AM

There has to be some javascript that makes it work. It could be either of the following:
<script type="text/javascript">
// Javascript code here
</script>

OR
<script type="text/javascript" src="myscript.js"></script>

Is this a modification that you have installed? A tutorial? Show me the source of this, wherever you got it from please.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users