How can I change the color of an onClick of the link 'a href '?
I just wanted to ask, how would I go about changing the color of the < a href > link on click using javascript for the id is highlighted in bold, maybe "addClass" syntax would do the trick?
I also want the original link to return to its original color when or the other highlighted links are clicked. In other words, a single link shows color is selected at a time.
< head >
" < link href =" https://fonts.googleapis.com/CSS?family=open+sans "rel ="stylesheet"type =" text/css"> "
" < script src =" https://AJAX.googleapis.com/AJAX/libs/jQuery/1.11.3/jQuery.min.js "> < / script > .
< / head >
< body >
< div id = 'bar Tools-Center' >
< ul >
"< id = li 'registry-top" > < a title = "Register online" style = "padding-left: 5px;" "href =" # "> save < /a > < /li >
"< id = li"customer account"> < a title ="Login to your account"href =" # "> my account < /a > < /li >".
"< id = li"top-support-launch"> < a title ="Ask for help"href =" # "> support < /a > < /li >".
< li > < a href = "#" > Accessability < /a > < /li >
< li > < a href = "#" > careers < /a > < /li >
< li > < a href = "#" > region change < /a > < /li >
"" "< img title ="go to our homepage"onMouseOver =" homeMouseRollover (this) "onMouseOut =" homeMouseOut (this) "src ="... / Icons/Icons/home153white.png Options Page "alt =" "/ >
"" < img title = "search our site" id = "search-site Internet-toggle" onMouseOver = "searchMouseRollover (this)" onMouseOut = "searchMouseOut (this)" src = "... Largeur/icons/Icons/magglasswhite.png Options Page' = "15px;" height = '15px'; alt = "" / >
< /ul >
< / div >
< / body >
Concerning
Todd
Definition:
An unordered list (UL) is made up of sequences of list items defined by the LI element.
In other words, the AMT must not contain anything that is not contained in an LI element. This means that it is illegal to an image in the OL element which is not contained in an LI element.
With respect to the highlighting of an item (LI) in the list, is to compare the href attribute of the element with the URL of the page. That is the href attribute is "register.html" then the URL is similar to www.mysite.com/register.html, then turn on the highest point. This can be achieved by using a bit of JavaScript.
I use jQuery to make the JS. The script looks like
{jQuery (document) .ready (function ($)}
var url = window.location.href;
$('_ul.nav_a').map (function () {}
$(this) .parent () .toggleClass ('active' this.href = url | this.href == url.split("?")) ([0].split("#") [0]);
});});
The above script compares the values and assigns a class active in a game, although the game contains a hash (#) or an anchor. The style of the current class can be created using CSS as
.the {}
color: pink;
}
There are two required libraries, namely
- https://code.jQuery.com/jQuery-2.2.1.min.js
- jQuery - queryParser.js of GitHub - mattsnider/jquery-plugin-query-parser: Simple plugin for jQuery to parse query strings.
Tags: Dreamweaver
Similar Questions
-
Hiya
on my desk, I managed somehow to change all my links to be opened by a program... IE interent explore opens in DIVX... and my Office link gets open DIVX... But if I check properties for this link he started the original link location... . How can I change the links on mt shoud Office to open the programs they intend to open
Help
Original title: links
Here is the solution: http://support.microsoft.com/kb/950505
-
Classic restoration changed by FF 29 tabs beige with black text on the tab active and beige with white text on other open tabs. The white text is not visible. How can I change the text in white with a darker color?
If this cannot be done, is there a way to reinstall FF 29 with just the security updates (and not all the other stuff) so that I can keep my 28 FF settings? Thank you.- Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
- Beside the classical restaurant theme, click on the Options button.
- Click the custom colors tab, then the less than (active/hover/default) tab.
- Below (active) tab, check 'Text', then click on the color swatch and choose black.
- Click the tab (unread) / new tab.
- (Unread) tab, check 'Text', then click on the color swatch and choose black.
-
How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0
You can add a theme of solid color to change the color of the top of the browser window, which contains the Menu bar.
-
How can I change the background color of my iPad
How can I change the background color of my iPad 1 5.1.1
You can change the wallpaper via settings > brightness and wallpaper
-
How can I change the color used by highlighting the e-mail messages
How can I change the color highlighting the e-mail messages?
Hi Hofstra64,
If you talk about the highlight appears when you select an e-mail message, this is related to the "Highlight color" parameter in your general settings of OS X. More information can be found in the following link:
Highlight color
Choose the color that you want to see when you put in highlight or select items.
OS X El Capitan: General preferences
https://support.Apple.com/kb/PH21910
Thank you for using communities Support from Apple!
-
For example, I go through a foreach loop and draw two points. How to distinguish this set of plots of the yet to come? How can I change the style, color and have separate lines (instead of on the line connecting everything) for each of my plots? I don't know how to set everything up, but it still does what he wants to do. TIA.
Hello
The problem you see occurs because of the following lines of code:
The _data and _data2 scatterPlot3 value
_data = scatterPlot3
_data2 = scatterPlot3
When you do this, you define _data as _data2 to reference an object of the simple concession - scatterPlot3. Yes, even if you have (from the code you have posted at least) three slots in your collection, they are all pointing to the same object of point cloud. So when you change the color for one, it changes the color for them all. However, I think that you have fallen on the right solution in your last sentence. If you want to have multiple locations on your ScatterGraph, each with its own color and style, they should each be separate and unique plots in the collection plot of your ScatterGraph. Based on the code you posted, you'll see this if you comment just the two lines shown above.
Please let me know if something is still uncertain.
NickB
National Instruments
-
How can I change the color of 8-bit to 16-bit on a screen monitor color flat viewsonic va702b
How can I change the color of 8-bit to 16-bit on a screen monitor color flat viewsonic va702b
Right click on some empty your desktop > properties > settings
I hope this helps.
-
How can we change the predator X 34 lights a different color?
How can we change the predator X 34 lights a different color?
I looked throguh the options and couldn't find it. It is still blue for me.
It's called "Ambient light" in menu 4. Allows you to change color, brightness, model behavior and sleep.
-
How can I change the color of the taskbar?
How can I change the color of the taskbar? Recently I got a bluescreen and restarted in safe mode with setting network, since my task bars have no color on the home screen task bars or internet
Hello
It's the color of your windows. Please try one of the following methods:
1 start > Control Panel > personalization > then... color of the window.
2. right click on desktop > customize > then...
Please note: as mentioned above, change the color of the taskbar will also change the color of the frame of the window.
Kind regards.
-
I've been playing with colors, patterns, etc. sometime. And now I realize that I don't see hyperlinks (because they are now in white color) in Outlook emails (and maybe not in Word, come to think of it). How can I change the color of the links back to something other than white? I can't find where to do.
Thank you
Brian Butler
Happy to help you sooner than that.
Steve
-
How can I change the black color to the screen? I tried all the usual stuff. I installed IE9.
Hi JOEGWF,
For instructions on changing the color, see the following article:
Change the colors on your computer
http://Windows.Microsoft.com/en-us/Windows-Vista/change-the-colors-on-your-computer -
How can I change the window color
Hello, I use Windows 7 Ultimate where in I am not able to change the color of the window.
whenever I click on it, it displays the "windows color and appearance".
Please tell me how can I change the color of my window?
My PC has 2 GB of RAM, 2.67 GHz processor and 64-bit operating system.
Hello Omkar,
Thanks for posting your question on the Microsoft community.
Thank you for your query details.
I also appreciate the fact that you want to change the color of windows.
I suggest you refer to the following Microsoft help articles and check if it helps.
Reference:
Change the colors on your computer
http://Windows.Microsoft.com/en-us/Windows/change-computer-colors#1TC=Windows-7Change the colors on your computer
http://Windows.Microsoft.com/en-us/Windows7/change-colors-on-your-computerI hope this information helps.
Please let us know if you need more help.
Thank you
-
How can I change the background color on the welcome login page
How can I change the background color to the aid of the background file, error 0x8000000A warned?
[Original title: Welcome to the page]
[Transferred from Internet Explorer]
Hello
Please try the suggestion of Mark L. Ferguson in the thread below.
Thank you
Legaede
-
What the devil? How can I change the color of a single border?
public static Border createSimpleBorder(XYEdges edges, XYEdges colors, int style)
How can I change the color of a single border and why in the world is the setting of colors, a type of XYEdges?
What the devil? How is it used? I threw in random numbers in the hope of a change in color, but I have nothing other than a black border.
b = BorderFactory.createSimpleBorder(new XYEdges(1, 1, 1, 1), new XYEdges(77, 55, 22, 33), Border.STYLE_SOLID);
255 should work much better than 256.
-
How can I change the color of the pices to Chess Titans?
How can I change the color of the Titan chess pieces?
Hello
If you tell the appearance to pieces then to open Chess Titans then press F7 (= appearance of change) on your keyboard. You now have a choice of 3 appearances of room * (and 3 plates). Select what you want and then click OK.
If you mean that you want to play as black against the computer, open Chess Titans then press F5 (= Options) and select this option near top left, then click OK. Pressing F5 gives also other options, including the graphic quality and a 2D view from top to bottom.
What you see by using F7 and F5 , it's what is available with regard to the colors of the room and customization.
* If you view descendant selected one-piece appearance option is available.
Maybe you are looking for
-
When going to the next iTunes update?
Screw the "how to write a good question", I'll be explicit enough here. I have an iPhone with the latest firmware 6. I have an iPod nano 7th generation with the last update of the firmware. I also have iTunes version 12.3.3.17. I've been using apple
-
I have - + toolbar, and when I press how to normal?and if I leave it to max the zoom, next time I open firefox, it keeps the zoom to the max! I want a toolbar icon to reset the Zoom
-
Hi all I have worked with a channel with the String data type and fill in the values with a script. This channel is really big, there was more 4 000 000 values long a few times. It worked perfectly fine last week. When I tried to run my script today
-
Pavilion 14-al011nd: gps chip HP Pavilion 14-al011nd
Is there a GPS chip in the Pavilion 14-al011nd or a way to have a system of GPS tracking on the laptop? Hidden theft.
-
I have a Toshiba laptop. I have recently upgraded to Windows 7, using all the programs compatibility of Microsoft and Toshiba. I got the green light and the message that Windows was installed correctly. Now, however, my Start button does work only