recently I faced the same problem & this is good for me.
if ( $('#para1').lenght == 1 ){ // if the id exists its length will be 1
alert('This Id exists');
} elseif ( $('#para1').lenght == 0 ){ // if the id doesn't exists its length will be 0
alert('This Id does not exists');
}