[SPIP Zone] r4440 - /_plugins_/_squelettes_/pagination_article2/pagination_article2.js

Author: fil@rezo.net
Date: Tue Aug 8 17:34:57 2006
New Revision: 4440

Log:
no need to end() the find() since we don't do anything with the result

Modified:
    _plugins_/_squelettes_/pagination_article2/pagination_article2.js

Modified: _plugins_/_squelettes_/pagination_article2/pagination_article2.js

--- _plugins_/_squelettes_/pagination_article2/pagination_article2.js (original)
+++ _plugins_/_squelettes_/pagination_article2/pagination_article2.js Tue Aug 8 17:34:57 2006
@@ -53,7 +53,7 @@
         $('#'+nom).append($('>*:lt('+(h[k]+1)+')',this).filter('*:gt('+(h[k-1]+1)+')').get()).hide();
// $('#'+nom).prepend(my_heading);
         //build table
- table.prepend('<li><a></a></li>').find('li:first-child a').set('href','#'+nom).html(my_heading.innerHTML).click(f).end();
+ table.prepend('<li><a></a></li>').find('li:first-child a').set('href','#'+nom).html(my_heading.innerHTML).click(f);
         //manage links inside the page to the blocks.
         //$('a[@href$="#'+nom+'"]').click(f);
       }

fil@rezo.net ha scritto:

no need to end() the find() since we don't do anything with the result

Not really. I forgot to write it in the comment, I did the same error.
After find('li:first-child a'), the current element of table is the <a> tag. So on next iteration you'll add a listitem to the anchor.

Renato

>no need to end() the find() since we don't do anything with the result

Not really. I forgot to write it in the comment, I did the same error.
After find('li:first-child a'), the current element of table is the <a>
tag. So on next iteration you'll add a listitem to the anchor.

Yes!! and this explains the weird things I fought with this morning!

-- Fil