[jQuery] toggling and element using two separate button elements

[jQuery] toggling and element using two separate button elements


Hi this is my first post to this group so please forgive me for any
errors I make.
The problem I am having is that I show a div element that contains
form elements, and inside this elements is another element that i want
to toggle.
How ever when I show the outer element using using button A I can
toggle the inner element fine, and I then hide the outer element using
button b.
When I open up the same element in the same way the inner element will
not toggle, but if i toggle the outer element using button a the inner
element works.
what do i need to do so that the inner element will toggle when i show
the outer with button a and hide with button b and then open it up
with button a again?
$('#add_image').click(function(){
        //show a div element with some form fields
        $('.add_image_container').show();
        //here is inner element within the above element that i want to
        //toggle to show and hide, css is initialy set to display:none;
        $('#image_folder_button').click(function(){
            $('.image_folder_dropdown').toggle();
        })
        //this is button b that i want to use to hide the outer element
        $('#cancel_add').click(function(){
            $('.add_image_container').hide();
        })
})//end of add image