Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


jQuery 1.8 #170

Nerian opened this Issue · 1 comment

3 participants



I upgraded to jQuery 1.8 and since then I get an error every time there is pjax call and it doesn't work.

Uncaught TypeError: Object #<Text> has no method 'getAttribute' jquery.js:4057

I am using Rails (3.2.8), jquery-rails (2.1.1), pjax-rails (head)

Full backtrack:

  Uncaught TypeError: Object #<Text> has no method 'getAttribute'         jquery.js:4057
  Sizzle.selectors.filter.ID.node                                         jquery.js:4057
  Sizzle.compile.cached                                                   jquery.js:4866
  select                                                                  jquery.js:4982
  select                                                                  jquery.js:5084
  Sizzle                                                                  jquery.js:3913
  Sizzle.matchesSelector                                                  jquery.js:5123
  jQuery.extend.filter                                                    jquery.js:5372                                                     jquery.js:5219
  (anonymous function)                                                    jquery.pjax.js:530
  jQuery.extend.each                                                      jquery.js:612
  jQuery.fn.jQuery.each                                                   jquery.js:242
  findAll                                                                 jquery.pjax.js:529
  extractContainer                                                        jquery.pjax.js:569
  options.success                                                         jquery.pjax.js:207                                                   jquery.js:974
  jQuery.Callbacks.self.fireWith                                          jquery.js:1081
  done                                                                    jquery.js:7584
  jQuery.ajaxTransport.send.callback                                      jquery.js:8299

I think I'm seeing the same problem with jQuery 1.8.0. Specifically, I'm getting a "getAttribute is not a function" error from jQuery when I try to specify a fragment option in $.pjax.

I'm pretty sure it has to do with how the findAll() function is checking TextNodes when it loops through elems. I did a PR that refactors the findAll function() slightly, and it seemed to fix the problem for me.

@josh josh closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.