if(menClass = 'menu1') // this returns true always, meaning menClass = 'menu1' no matter what the value of your origininal men class name.
try:
if(menClass == 'menu1') {
do your code...
placeholder?
I.E. only reads document.getElementById, document.getElementsByTagName and many others involving xml node selection, try to put an id to your anchor element, if you can't try this
...
you can achieve that by adding and id to <p id='theid'>
<input type="button" onClick="toggleMe('toggleHolmes');" value="Click to toggle"/>
</p>
, that is if you only want to replace this to a new...
browsers adopt the change immediately except for I.E. explorer loads the document first before executing the js code. browsers read the entire js code written in that particular page before opening a...
You can do that using AJAX, that is if the content you want to display reside on your database or you want to load a page on that particular div but if not, you can write the content of your second...
try this out:
function changeLink(sender) {
var thelink = document.getElementById('the id of your link element');
switch(sender.value) {
case "button1_value":
...
your mouse out do trigger inside your div element because the browser reads the content element and not your div element if your div element contains other elements. to rectify modify your function...
sorry for my late response, i believe you had not copied the entire code
function changeColor(els) {
els.style.color = "your_color";
//add another function to change back to its original color...
Info: Adding an id is a good move but adding <span> on <a> element isn't. Adding an id or not, you can dynamically change the text color directly to your <a> element.
steps:
1.) create a function...