Search

3/03/2008

Every keystroke is a prisoner - a neat commenting trick

Ajaxian » Every keystroke is a prisoner - a neat commenting trick
If you however use the following syntax then you only need to delete one slash to comment and uncomment a section:

foo();
/*
bar();
baz.foo = 200;
return{
dolly:clone()
}
// */

foo();
//*
bar();
baz.foo = 200;
return{
dolly:clone()
}
// */

in CSS you can just delete and add and remove an asterisk:
.test{
border:1px solid red;
/*/
background-color:blue;
/**/
margin:1em;
}

.test{
border:1px solid red;
/**/
background-color:blue;
/**/
margin:1em;
}

沒有留言: