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
Solved

javascript onClick function not working

Posted on 2013-05-31
3
404 Views
Last Modified: 2013-06-20
on this page One of the navigators "Associated Profession/Therapy" view more link not working while it works on other navigators. The javascript view more function is as below

function ViewMore(spacetId){  
    $("#" + spacetId + " li").each(
        function(){  
            if($(this).children("a").hasClass("showAll"))                
                $(this).css("display", "none");
            else if($(this).children("a").hasClass("showTop"))
                $(this).css("display", "block");
            else                
                $(this).show();                
        }
    );    
    return false;
}

Open in new window


Any ideas how to fix this?
0
Comment
Question by:mmalik15
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39211269
Because the slash it fail : AssociatedProfession / Therapy
The other don't have slash :
AreaofPractice
Location

slash is not a good char inside an ID attribute
0
 

Author Comment

by:mmalik15
ID: 39211284
thanks for the comment.

I can't change the slash in the navigator but can modify the script if this can be tackled.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 39211308
Remove the slash the same  way you removed the spaces for the others links.
Yes the same way
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 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