The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Title for PM in Dropdown Navbar

3 posters

Go down

Solved Title for PM in Dropdown Navbar

Post by Aconitin November 27th 2012, 8:49 am

Hello..
If you get new private message and then you hover the PM menu in navbar, the title will appear and show you how many message that you get..
Like this SS :
Title for PM in Dropdown Navbar Untitl11
Now, I change the regular navbar to dropdown navbar like in this topic -> https://help.forumotion.com/t116289-code-for-sexy-drop-down-nav-bar
And when I get new PM, the title doesn't appear anymore.. Sad
I guess I have to add title attribute in HTML script, but I don't know what title can be used so the title will show me how many message that I get, something like :
Code:
    <li><a href="/privmsg?folder=inbox"title="What Title Can be Used?">Message</a></li>
Help, please..
If you don't understand, feel free to ask question.. Razz


Last edited by Aconitin on December 23rd 2012, 1:35 pm; edited 1 time in total
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin November 28th 2012, 8:53 am

Bump.. lol!
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin November 29th 2012, 1:27 pm

Bump.. Very Happy
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin December 1st 2012, 5:20 pm

Bump..
Please help, guys.. Wink
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin December 16th 2012, 3:18 pm

Sorry for really late reply..
@Rideem : But, my HTML script is like this
Code:
    <li><a id="inbox_text" href="/privmsg?folder=inbox">Message</a></li></a>
And my Javascript :
Code:
    $(function() {
    if (document.getElementById('i_icon_mini_new_message')) document.getElementById('inbox_text').innerHTML = "New Messages";
    });
From this topic -> https://help.forumotion.com/t116289-code-for-sexy-drop-down-nav-bar
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin December 17th 2012, 5:02 am

No, I just hide it like your suggestion.. Wink
Code:
<span style="display: none">{GENERATED_NAV_BAR}</span>
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by nextlevelgaming December 17th 2012, 2:55 pm

Maybe something like this?
Code:

(function($){
$(document).ready(function(){
$('#i_icon_mini_message').each( function() {
    var s = $(this).attr('title');
    $(this).children(".inbox_test").html(m);
});
});
})(jQuery);
nextlevelgaming
nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by nextlevelgaming December 17th 2012, 9:22 pm

Well I know this works for me, so. I don't have all his markup here to check and everything so. Like I said this code works perfectly fine for me.

Maybe .children() could be changed to .find() or .closest()
nextlevelgaming
nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin December 18th 2012, 3:32 pm

Actually, I don't try this yet.. Very Happy
I want to get confirmation firstly..
So, the HTML script would be like this :
Code:
    <li><a id="inbox_link" href="/privmsg?folder=inbox"id="inbox_text">Message</a></li></a>
And JS script would be like this:
Code:
        $(function() {
        if (document.getElementById('i_icon_mini_new_message')) document.getElementById('inbox_text').innerHTML = "New Messages";
        });
    $(function() {
    if (document.getElementById('i_icon_mini_new_message')) document.getElementById('inbox_link').innerHTML = document.getElementById('i_icon_mini_new_message').title;
    });

Am I right?
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin December 20th 2012, 5:11 am

Bumpz.. santa
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Aconitin December 23rd 2012, 12:04 pm

Thanks..
All of you are the best.. Wink

-SOLVED-
Aconitin
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

Solved Re: Title for PM in Dropdown Navbar

Post by Sanket December 23rd 2012, 3:02 pm

Topic Solved & Locked
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum