Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

javascript onClick function not working

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
mmalik15
Asked:
mmalik15
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
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
 
mmalik15Author Commented:
thanks for the comment.

I can't change the slash in the navigator but can modify the script if this can be tackled.
0
 
leakim971PluritechnicianCommented:
Remove the slash the same  way you removed the spaces for the others links.
Yes the same way
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now