javascript - Binding a js event according to mouse position : performance killer or not? -


i've done : http://jsfiddle.net/cs273/4/

on fiddle, when mouse reaches right area of text input, changes cursor (pointer) , creates click event listener. when mouse gets out of right area, same event listener destroyed.

i call "on fly" event listener binding, perhaps has name.

is thing or not ?

all things being equal, you'll never notice performance hit, odd way want.

i'd suggest re-working html 'x' isn't part of input , can attach normal event handler.

example: http://jsfiddle.net/cwolves/cs273/6/


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -