How to pass field ID dynamically to show() and hide() methods

How to pass field ID dynamically to show() and hide() methods

Hi,

I am working on JQuery show and hide methods. I want to show and hide some fields. But those fields are dynamically generated. I have generated those field ids also dynamically. But i am unable to pass that dynamically generated id to the show or hide method. My code is as follows: please suggest me how to pass the ID dynamically.
$("h3").click(function () {
$(this).hide(); 
$('#trimnotesid1').show();
});

in the red marked place i have to pass the dynamically generated field id instead of static one. I have generated id as follows:

$("b").click(function () {
$(this).hide("slow");
var a = this.id; var b = a.substring(11);
var c = 'completenotesid'+b; // I am getting the dynamically generated id to this var
var d = '#'+c+'#';
var e = '\''+d+'\''; 
$('#completenotesid0').show("slow"); // In the red color area, i want the dynamic id to be populated });