Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 415
  • 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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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