On Tue, Mar 1, 2011 at 7:57 PM, Jatin kumar <[email protected]>wrote:
> > > On Tue, Mar 1, 2011 at 11:37 AM, Pale Horse <[email protected]> wrote: > >> Jatin Kumar wrote in post #984692: >> > On Tue, Mar 1, 2011 at 11:11 AM, Pale Horse <[email protected]> >> > wrote: >> > >> > itself but a glossary listing will also be available. >> > >> > Honestly, I'm not really sure what the best method of displaying the >> > definition on the page would be; I don't want the definition to be >> > obtrusive. >> > >> >> Where do you want to show the definition, and on what event, i mean is >> it >> >> like when you hover over the highlighted text or what? >> >> onmouseover >> >> When you are doing the matching using jQuery, you could change the content > of pages, in such a way that each matching word (highlighted word) is like > an anchor tag or simple text, which when hovered over, can do two things via > jQuery: > > 1. Fire an ajax call to the server, asking for the description of the > name. > > I think this is the better option. plus you can minimize the request to the server if you somehow store already hovered words into a global js variable. so onmouseover, check the array if the word is there. if it's there, then you don't need to do an ajax request anymore. > or > > 2. Send the description alongwith the names in json format, and when > hovered over, display the description from the json object you have. > >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

