jquery whizzes I need help!

I don't know if I'm just burnt out or don't have a handle on it, but, here is what I need help on.

I am tinkering with messenger_core.js

I am here...

                    // if isset new messages for current chat box;
                    if (oResponse.senders[i].messages_list) {
                        // if chat box's messages come in section as `message_block`;
                        if ( oResponse.senders[i].messages_list != 'built-in') {

                            var iChatBoxHeight =  $el.outerHeight();
                            var iOldChatBoxContentHeight = this.getChatBoxContentHeight($el);
                            var sVisibleState = this.getVisibility($el);
                                                       
                            if( (sVisibleState == 'hidden' && !this.oDefinedChatBoxes.boxes[iChatBoxIndex].blink_handler) || bBoxUndefined ) {
                                // send the flesh signals;
                                this.setBlinkMode(iChatBoxIndex, $el);
                               
//SteveSoft
//02-10-2013
//Not in focus
                                soundManager.play('beep');
                               
                            }else{
                               
                                //beep and flash if not in focus                  <-----             
                            }
                            // add received messages into current chat box;
                            $el.append(oResponse.senders[i].messages_list);

if this box is NOT in focus, I need to to beep and flash.

Then when you click on it, stop flashing.

I know somewhere I need to do this

$(this).attr('tabindex', index)

where this is the chat box with the id that gets created.

Then check if that tabindex is in focus.

when I do .is("focus"); on the text input box its always true so that's driving me crazy too!

So, basically if  the chat box is open, and you have clicked somewhere else, OR on another tab, I need it to flash and beep.


Thanks!

 

 

http://www.mytikibar.com
Quote · 12 Feb 2013

Did you tried google?

Try $("input")[0] == document.activeE

when I do .is("focus"); on the text input box its always true so that's driving me crazy too!

 

so much to do....
Quote · 12 Feb 2013

So I figured it out.

I just checked for hover on the current window that got a chat in and it works!

http://www.mytikibar.com
Quote · 12 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.