I’m a total newbie when it comes to Javascript/jQuery so hopefully you can help me.
I have a textbox where most people are gonna paste links into. Is there a nice way for the textbox to detect that a link has been pasted (starts with http://) and then remove the protocol dynamically in the textbox without having to push a button or so afterwards?
Assuming you want it stripped out as soon as the user types/pastes it:
Lets say for arguments sake that you’ve given the text input the id “url”:
As mentioned by @Marcel Korpel in the comments this should now take care of what you want.