I am trying to remove divs from a document when a letter is typed, but I cant seem to get the logic and/or syntax down. Currently the code I’m using to do this is commented out in the html document with a working version which removes what is typed uncommented below it. All of my code is below. Any help on this would be great.
Again, I am trying to remove a div element based on what the user types in.
I’m not really sure exactly what you are going for, because that code was too hard to decipher.
Here’s some code that will remove a div based on keyup. It removes the div that contains the same letter as what you typed. Not sure if that’s similar to what you want, but hopefully this helps:
http://jsfiddle.net/h2fa4/1/
HTML:
jQuery code: