mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
jquery for list manipulation. Round one, fight. Props mdawaffe. fixes #4805
git-svn-id: https://develop.svn.wordpress.org/trunk@6213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
jQuery(function($) {
|
||||
var delAfter; var extra; var list;
|
||||
|
||||
if ( document.location.href.match(/(\?|&)c=/) )
|
||||
delAfter = function() { $('#comments, #the-comment-list').remove(); }
|
||||
else
|
||||
delAfter = function() {
|
||||
list[0].wpList.add( extra.children(':eq(0)').remove().clone() );
|
||||
$('#get-extra-button').click();
|
||||
}
|
||||
|
||||
var addBefore = function ( settings ) {
|
||||
var q = document.location.href.split('?');
|
||||
if ( q[1] )
|
||||
settings.data += '&' + q[1];
|
||||
return settings;
|
||||
}
|
||||
|
||||
extra = $('#the-extra-list').wpList( { alt: '', addBefore: addBefore, addColor: 'none', delColor: 'none' } );
|
||||
list = $('#the-list').wpList( { delAfter: delAfter, addColor: 'none' } );
|
||||
|
||||
} );
|
||||
Reference in New Issue
Block a user