Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

When trying to 'expand' the reputation (by clicking on the arrow) it shows the AJAX loader.

But nothing happens. It doesn't even make a request to the server :P

cannot expand rep

This is for both expanding the question and the date.

It looks like somebody screw up the javascript (no need to point fingers ;) ):

Uncaught TypeError: Cannot call method 'indexOf' of undefined




JS error


Tested in both Chrome Canary and stable

share|improve this question
It works for me. – kiamlaluno Jan 3 '12 at 18:18
@kiamlaluno platform? – PeeHaa Jan 3 '12 at 18:18
I am using Safari 5.1.2 on Mac OS X 10.7.2; if the location can make the difference, I am in Italy. – kiamlaluno Jan 3 '12 at 18:20
Works for me in chrome and IE 9. – jadarnel27 Jan 3 '12 at 19:15
@jadarnel27 it was fixed so now it works for everyone. :-) – Shadow Wizard Jan 3 '12 at 21:12
up vote 10 down vote accepted

It's due to upgrading jQuery to 1.7.1 - there is this line of code:

var p = $(this).closest("td").attr("id");

The .attr() was replaced by .prop() as of jQuery 1.6 so combined with the fact the parent <td> has no ID, it broke the code: prior to 1.6 it returned empty string.. after 1.6 it returns undefined value.

Test case with jQuery 1.5.2

Test case with jQuery 1.7.1

Test case for fixed code.

share|improve this answer
@balpha Now I feel bad that I posted this question :P Please don't tell them where I live :) – PeeHaa Jan 3 '12 at 18:31
LOL! The irony... :D – Shadow Wizard Jan 3 '12 at 18:32
well at least it is stated clearly in the jQuery documentation so I'm no the one to blame (this is just in my defense of course :D ). – PeeHaa Jan 3 '12 at 18:36
Yes indeed and they probably changed this in the "main" JS code, that error occurs in rather "minor" file that was probably overlooked. – Shadow Wizard Jan 3 '12 at 21:11
This isn't really true. .attr was not replaced by .prop; they're different methods with different use cases, and .attr is still the correct one to use here. The actuall issue here is that while the DOM specification says getAttribute should return an empty string for non-existent attributes, pretty much all browsers return null instead -- which jQuery then "normalizes" to undefined (of course null would've caused the same issue)., however, is always a string (even if empty). That's why using prop instead of attr worked. /cc @PeeHaa – balpha Jan 4 '12 at 10:07
@balpha thanks, didn't delve so deep into it now I learned some new things. :) – Shadow Wizard Jan 4 '12 at 10:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .