I have (thanks with some help) an input field, where the user can search for words. Now i trying to do something, but cant figure it out, so maybe, some one can help me?
A.t.m. the site shows for each word also an symbol. Now i'm trying so that all the symbols are always hidden at the start. Then when the user search for the a word, i want for that specific word that the symbol appears and then the word disappears.
[example given: the site shows this: "Hello, how are you?", when the user then search for "Hello", i want this to happen; "—, how are you?". So the word and symbol switches, and then when the next word has been input, the new word would change to the symbol and the previous word would appear again (and that specific symbol would disappear again then) ["—, how are you?" into "Hello, how — you?" (when are has been search)]]
I can't figure it out to work on specific word only. I have giving every word 2 classes: Woord (base class) and key (key= word that is same as word on screen [are has classes: "are woord"]
I'm writing a html site, and i'm trying to add a jquery input system.
I wrote a html page were i divided every word into a class; an class= "A" and a class="B". every class also has a another class attached to it; class="A key1" and a class="B key2". i added a css stylesheet already for the A and B classes.
What i want is this: If got a text where every word has a "A key1" and "B key2" class. Default i want the "key1" class to be display:none;. On the top of the page, i want a input box, where you can enter a word (any word). If the word, that has been put in by the user, equals the same as "key2", then i would like it to switch between hiding "key1" and "key2". [So upon input, the key 1 is hiding and key 2 isn't. When the user inserts an word that equals that specific class, it would hide key 2 instead and display key1.]
Now, i'm trying to figure out how to do this. I found jquery tutorials on switching 2 things, and input data, but i can't combine the two.