- Do you toggle comments or slabs of code to quickly show or hide content?
- What are some common methods you use?
- Is there an accepted standard?
- Should some methods be avoided? ie could they be misinterpreted by some engines?
- Is there an alternative or better solution to this?
Standard - This is what I use to cover most languages: CSS, JavaScript, PHP, ActionScript
/**/ visible /**/
/**\/ hidden /**/
HTML
<!----> visible <!---->
<!----/> hidden <!---->
PHP - Defining something like $hide works well, other variables could be production or dev - large slabs can then be hidden and shown together with one simple variable change.
if(0){ hidden }
if(1){ visible }
if(!$HIDE){ content } // $HIDE defined elsewhere, visible if undefined