Feature reques: toggle attribute

Feature reques: toggle attribute

usecase:

  1. function onclick(){       
  2.        if(expression == true){
  3.             $("#myselector").attr("checked","checked");
  4.         }else
  5.             $("#myselecto").removeAttr("checked");
  6. }
So, maybe better add
$("myselector").toggleAttr("checked","checked");