[Solved] I would like to amend my jquery script to add a different #id


$('#author-dropdown').attr("id","author-dropdown-extended").slideDown();

and also change the following to set it back to original state

$('#author-dropdown-extended').attr("id","author-dropdown").slideUp();

I would personally try something like this though…

$('#showhide').click(function() {
    if($('.author-dropdown').is(':hidden')) {
      $('.author-dropdown').slideDown().removeClass('author-dropdown').addClass('author-dropdown-extended');
    } else {
      $('.author-dropdown').slideUp().removeClass('author-dropdown-extended').addClass('author-dropdown');
    }
    return false;
  });

4

solved I would like to amend my jquery script to add a different #id