Get part of string to cursor
I need to take value from beginning of input to cursor. val() return whole string. How can I only this part which I`m interested in?
Get part of string to cursor
===

I need to take value from beginning of input to cursor. val() return whole string. How can I only this part which I`m interested in?