I have input and blur. I want to keep the value. The problem is that I have autocomplete, and when users click on a sentence from the autocomplete list, the blur starts.
For example: users enter βiPβ into the input, and then click βiPhoneβ from the autocomplete list. This cast contains the iP and iPhone values ββ(the iP storage caused by blur and the iPhone storage caused by autocomplete).
I was thinking about checking for blur triggering by clicking on the autocomplete list.
$('input').blur(function(e){ if(e.IsClickOnAutocomplete) return; else save_value; });
So, how can I check how the blur was caused?
EDIT Here's a jsFiddle that shows something similar to my problem http://jsfiddle.net/mkp8m/1
source share