Pop up of side bar question

Posted on 2013-01-02
Last Modified: 2013-01-19
Hi everyone,

I have a javascript file for a module I purchased and want to make a small change to it. Side Bar Image
When you click on a topic header all of the sub heading pop out also (as in the attached image,  this is what appears after I click "Photo" ).

I would like to change this so that the sub-headings do not pop out at all. All of the other functionality is correct.

Here is the javascript file that I believe controls the page but I'm having some difficulty locating the part that changes this.

$Core.mgfaq = {

    	var sidebar = $('#js_block_border_faq_panel');
    	var top = sidebar.offset().top - parseFloat(sidebar.css('marginTop'));
    	$(window).scroll(function (event) {
    		var ypos = $(this).scrollTop();
    		if (ypos >= top) {
    		else {
          onAfter:function( anchor, settings ){}
    	$('ul.faq_submenu li a').click(function(e){
    		var linkHref = $(this).attr('href');
            //var linkHrefID = linkHref;
            var linkHrefClass = linkHref.replace("#", ".");
            var relId = $(this).attr('rel');
                $(linkHrefClass).highlightFade({color:'rgb(255, 236, 142)', speed: 2000});
                //$(linkHrefID).highlightFade({color:'rgb(255, 236, 142)', speed: 2000});
            }, 600);
    	$('#js_block_border_faq_panel ul.action li a').click(function(e){
    		var linkHref = $(this).attr('href');
            //var linkHrefQID = linkHref;
    		var linkHrefID = $(this).attr('rel');
            linkHref = linkHref.replace("#", ".");
                $(linkHref).highlightFade({color:'rgb(255, 236, 142)', speed: 2000});
                //$(linkHrefQID).highlightFade({color:'rgb(255, 236, 142)', speed: 2000});
            }, 600);


$Behavior.initMGFAQPage = function(){

Open in new window

Thanks for your help,

Question by:TLN_CANADA
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 18

Expert Comment

ID: 38738902
Instead of having the submenu pop out, what do you want them to do?
If they don't pop out, how do you want visitors to access the links?

Author Comment

ID: 38738904
Hey Rartemass, yes, it can just take them directly to the links section on that page. Sorry for not clarifying that. It's an FAQ page.
LVL 18

Expert Comment

ID: 38738929
It has been a while since I have coded in javascript and jquery so take this advice with the requisite grain of salt.
On lines 32 and 46 there is .hide().
Chanigng this to .show() should prevent the elements from hiding and thus remain visible at all times.

Author Comment

ID: 38739031
Hi, sorry, maybe I wasn't clear in the functionality I wanted. I don't want to sub-menus to appear at all. Changing the hide function to show just makes the page so that the sub-menus can be toggled to show and to hide.

I want to keep the sub menus invisible at all time. The script is already setup so that if a user clicks on a menu item it takes them to take part of the page so all that is needed is to remove the function that opens the sub-menu items upon clicking the menu item.


LVL 18

Accepted Solution

Rartemass earned 500 total points
ID: 38739255
OK that makes sense now.
Do you have the sub menus specified in the HTML at all? I would first remove any sub menus or at least set them to display:none in the CSS.
This may not resolve the issue however.

Do you have this working on a live website that we can take a look at? It will make things easier to pinpoint.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
javascript form submition 2 22
Getting selected value using Jquery 3 23
Echo'd values in dropdowns 6 32
What is the correct way to check for empty value in input field 2 20
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question