Advertisement
SSTWebmaster

checking for the existence of a dom object

Sep 27th, 2011
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.48 KB | None | 0 0
  1. $("select").change(function(event){
  2.     switch(
  3.         $(this).val()){
  4.             case '0':
  5.             break;
  6.             case '1': case '5': case '6': case '8': case '9': case '10':
  7.                 if($("txComments").length > 0){
  8.                                
  9.                 }else{
  10.                 $('#MainTable').append('<p style="float:left;width:99%" class="dateWidth">Comments:  <br/><textarea id="txComments" name="txComments" class="ui-state-default ui-corner-all" id="rDetails" style="width:100%; height: 120px"></textarea></p>');
  11.                 }
  12.                 break;
  13.             }
  14. });
  15.  
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement