Side navigation
#7220 closed bug (fixed)
Opened October 17, 2010 02:27AM UTC
Closed October 22, 2010 05:19AM UTC
Last modified March 19, 2012 09:19PM UTC
Next Sibling combined with :last is failing.
Reported by: | marioestrada | Owned by: | john |
---|---|---|---|
Priority: | blocker | Milestone: | 1.4.4 |
Component: | selector | Version: | 1.4.3 |
Keywords: | regression | Cc: | |
Blocked by: | Blocking: |
Description
At techspot.com I have a selector that runs after more stories have been loading using ajax and where the page should scroll to the first loaded story, but with 1.4.3 it is no longer working.
The selector is '.next_page:last + .headline_story' it used to work on 1.4.2 but not anymore, it doesn't find any objects. Using the alternative '''$('.next_page:last').next('.headline_story')''' works but still I think this is a bug since it used to work.
Attachments (0)
Change History (8)
Changed October 17, 2010 02:43AM UTC by comment:1
Changed October 17, 2010 06:17AM UTC by comment:2
component: | unfiled → selector |
---|---|
keywords: | → regression |
priority: | undecided → blocker |
status: | new → open |
Changed October 22, 2010 12:48AM UTC by comment:3
_comment0: | I threw together this tiny plugin to help debug issues like this: \ \ {{{ \ $.fn.logSelector = function() { \ return this.append( this.selector + '<br/>' ); \ }; \ }}} \ \ See it in use here: http://jsfiddle.net/cowboy/skGZx/ → 1287709092173893 |
---|---|
_comment1: | I threw together this tiny plugin to help debug issues like this: \ \ {{{ \ $.fn.logSelector = function() { \ var elem = this.length ? this : $('body'); \ elem.append( this.selector + ' [' + this.length + ']<br/>' ); \ return this; \ }; \ }}} \ \ See it in use here: http://jsfiddle.net/cowboy/skGZx/ → 1287710539333015 |
_comment2: | I threw together this tiny plugin to help debug issues like this: \ \ {{{ \ // Log the selector used to select elements to each selected element, \ // otherwise to the body. Hover over logged selectors to highlight \ // stuff all fancy-like (note: don't select SPAN elements because this \ // creates them all over the place!) - Cowboy \ \ $.fn.logSelector = function() { \ var elems = $( '<span>' + this.selector + ' [' + this.length + ']</span>' ) \ .appendTo( this.length ? this : 'body' ); \ \ this.length && elems.hover(function(e){ \ elems.parent().andSelf().toggleClass( 'hover', e.type === 'mouseenter' ); \ }); \ \ return this; \ }; \ }}} \ \ See it in use here: http://jsfiddle.net/cowboy/skGZx/ → 1287759935602245 |
I threw together this tiny plugin to help debug issues like this: http://gist.github.com/640714
See it in use here: http://jsfiddle.net/cowboy/skGZx/
Changed October 22, 2010 01:01AM UTC by comment:4
Also, the link in my last comment has a bunch of test cases that fail in 1.4.3 but work in 1.4.2 - please add more!
Changed October 22, 2010 02:20AM UTC by comment:5
owner: | → ajpiano |
---|---|
status: | open → assigned |
Changed October 22, 2010 03:17AM UTC by comment:6
owner: | ajpiano → john |
---|
Here is a test case:
http://jsfiddle.net/Xy9GL/ with the + selector not working.
And working using .next():
http://jsfiddle.net/n5Nh5/1/