Solved

javascript onClick function not working

Posted on 2013-05-31
3
405 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating Date Part2 2 27
ASP get fieds value 2 21
Html date format 9 20
What is the correct way to check for empty value in input field 2 16
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
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.
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…

756 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