views:

20

answers:

1

Hi, im making an application that creates a text input where ever you click. I was having a problem where whenever you would click inside the field another text field would appear but i managed to fix that. I have one last major issue that I just can't solve. I know ou can't use blur() and focus() as arguments (though it would be nice) but i need to find a way so that after you enter text into the input field and out click, it just blurs the input box and doesn't create another until the user clicks again.

A: 

Just create a variable to keep track or only use a certain ID for the input you create, then check for that variable or input element before creation..

if(!$("#myDynamicInputElement").length){
    //TODO: Create your element..
}
Quintin Robinson