Jump to content

Live JavaScript.


Millar
 Share

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...