I have a word inside of a div. that's part of a drop down but the drop down is hidden, the specific focus is on "DC" right now:


HTML Code:
<td class="edit">
<select class="touch" style="display: none;">
<option value="11">Rebuying</option><option value="12">Sales</option></select>
<span class="look">DC</span>
After you click on the word "DC" a drop down select appears. Notice the class changed from edit to editing.

HTML Code:
<td class="editing" data-oldvalue="13">
<select class="touch" style="display: inline-block;">
<option value="11">Rebuying</option><option value="12">Sales</option></select>
<span class="look" style="display: none;">DC</span>
Here's my function for show() hide():

//allow flipping between "look" and "touch" mode for all editable fields
        $('td.edit' + suffix).click(function(event) {
            //make this the only TD in "editing" mode

        var mouse_is_inside = false;

            }, function(){ 

                if(! mouse_is_inside) $('.touch').hide();

function back_to_look() {
    $('td.editing ,td.edit.new').each(function() {
        if (!$(this).hasClass('edit')) {
        if ($(this).hasClass('editing')) {

function td_to_touch(td) {
    var theTouch = td.children('.touch');
    var theLook = td.children('.look');
    var oldVal = theLook.text().trim();


    //save the existing value so it can be compared to when the "change" event is fired on the element
    td.attr('data-oldvalue', theTouch.val());

    if (theTouch.is('select')) {        
        theTouch.children('option:contains(' + oldVal + ')').attr('selected', 'selected');
    } else {
The first part works okay, when i click on the word "DC" the drop down appears... and when i click outside the div back into the body it hides. That works fairly good, the problem is when the drop down select box is showing and i click on it to make a selection it disappears before i can make my selection because i'm using the mouseup() function.

I need people to be able to make a selection and than after that when they click outside of the div it disappears.

I've tried using .live, on(click, function()) and just about everything. Please any help would be greatly appreciated. Thank you.

SYNOPSIS: The drop down won't stay open so i can make a selection because i'm using mouseup().