Solved

Jquery not working in IE 10

Posted on 2014-09-26
7
945 Views
Last Modified: 2014-09-29
I have a jquery function that toggles see more + and see less+ off and on which works fine in Firefox and Chrome. It does not work in Internet Explorer 10 (but does seem to work in IE9).
Below is the script

 <script>  
        $(document).ready(function(){
      $("p[id^='seeall']").click(function() {
            var $this = $(this);
         $(this).next("div").toggle();
      if ('see more +' == $this.text( )) {
    $this.text('see less -').parent( ).find('.hidden').show( );
    }
    else {
    $this.text('see more +').parent( ).find('.hidden').hide( );
    }
      });
      });
   </script>
0
Comment
Question by:cbeverly
  • 4
  • 3
7 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40346659
Got a link to the page?
0
 

Author Comment

by:cbeverly
ID: 40346677
http://americanart.si.edu/collections/search/artwork/results/index.cfm?rows=10&q=James+Castle&page=1&start=0&x=0&y=0

You can see the See more+ see less+ on the right hand side underneath the light blue bar "Name"
0
 
LVL 58

Expert Comment

by:Gary
ID: 40346681
Working fine, do an hard refresh - maybe you have an old cached file.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:cbeverly
ID: 40346698
Did you test in IE 10?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40346709
In an emulator, there is nothing in the code that would break in IE
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40346719
Just double check you're not in compatibility mode (even though it works in previous versions as well)
0
 

Author Closing Comment

by:cbeverly
ID: 40350674
You were so right. The user was in compatibility mode. Once I took her out it worked fine.
Thank you so much!!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

831 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