Little help needed with a javascript issue
-
Hello,
I have some buttons that chance appearance when mouse-overed.
It worked fine until I put the javascript to an external file. Now it’s somehow, not founding the images that should appear when hovered, the button just disappears. I assume that I can use the script just the same manner I used it when it was embedded to the file, right?
As you see below I link to the images using the
stylesheet_directory, could the problem somehow be in this?button1up = new Image; button1up.src = "<?php bloginfo('stylesheet_directory'); ?>/images/image1.png"; button1down = new Image; button1down.src = "<?php bloginfo('stylesheet_directory'); ?>/images/image2.png";And I link to the javascript-file like this:
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/javascript/buttons.js"></script>If some nice person could please give me a hand here. All help appreciated! Thanks 🙂
The topic ‘Little help needed with a javascript issue’ is closed to new replies.