Millar Posted May 2, 2006 Share Posted May 2, 2006 I was wondering if there is anyway I could use javascrip in a member legend so that when you hover over the word admin on the legend it would make admins bold, I would be able to make it happen if say you clicked the word, but is there anyway you can make it live, so that when you hover over the world they become bold, I would think you would need to assign CSS styles to each group and make some sort of on hover that value = bold but I don't know how to do that so help is appreciated.Extra Info -A member legend on a forum so say for example it was like this -Users online - An Admin, A mod, Normal Member, Normal Member.Legend: Admin | Mods | Members.Say you hovered your mouse over Admin the name of the admins online would become bold. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2006 Share Posted May 2, 2006 You can use pure CSS for this but IE won't work correctly so here is a method in JavaScript. When you hover over <span onmouseover="this.style.fontWeight='bold'" onmouseout="this.style.fontWeight='normal'">this</span> word it will get bold. Link to comment Share on other sites More sharing options...
Millar Posted May 4, 2006 Author Share Posted May 4, 2006 I don't mean that I mean this.Say the legend looks like this,Users online - An Admin, A mod, Normal Member, Normal Member.Legend: Admin | Mods | Members.and I put my mouse over Admin, this happens...Users online - An Admin, A mod, Normal Member, Normal Member.Legend: Admin <-Mouse Over Here. | Mods | Members. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 4, 2006 Share Posted May 4, 2006 ....ahhhh....that is what my code does! Did you even try it? Link to comment Share on other sites More sharing options...
Millar Posted May 4, 2006 Author Share Posted May 4, 2006 Yes, yours would mean when I hover over Admin, Admin would become bold, I want it so when you hover over Admin, all the admins on the list go bold... Link to comment Share on other sites More sharing options...
aspnetguy Posted May 4, 2006 Share Posted May 4, 2006 oh sorry...I think you will need more than javascript to do that. You will have...How do you know if a user is an admin (is it stored in the database?).If it is in the database you will have to write some code witht he server side language, so to do this seemlessly you will have to use AJAX.Read the tutorials to learn the basics Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now