Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-11-2011, 01:38 AM   PM User | #1
kreut
New Coder

 
Join Date: Feb 2011
Location: Bellingham, WA
Posts: 31
Thanks: 11
Thanked 0 Times in 0 Posts
kreut is an unknown quantity at this point
Using the jquery tooltip with a conditional

Hello!

I'm working on a series of pages which have quizzes involved with them. For most of them, I'm printing a response right next to the question(:Correct" or one of several possible wrong answer responses) using the following code (integrated with a larger swath of javascript):

Code:
function {checkAnswer(obj,answers,wrong_answers)
{obj.nextSibling.innerHTML = (obj.value == answers[obj.qNum])? 'Correct!' : wrong_answers[obj.qNum];
            }
It works great except for the fact that some of my "questions" are single textboxes integrated into the text around it. I'm hoping to find an elegant way to show the appropriate message. Would the jquery tooltip be a possibility? In other words, can it be used so that one it pops up right next to the textbox within the context of my "checkAnswer" function? If not, if you have any other elegant solutions to this issue, I'd appreciate your thoughts.

Thank you,

Eric
kreut is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:21 AM.


Advertisement
Log in to turn off these ads.