WordPress.org

Ready to get started?Download WordPress

Forums

js in sidebar (2 posts)

  1. sasole
    Member
    Posted 7 years ago #

    Hi,

    I'm trying to insert a crossbrowser (yes it woks in ff as well) fading images script at the top off the right sidebar. Like so.

    <div id="sidebar_right">

    <script type="text/javascript" src="js/fotos.js"></script>

    <ul id="sidebar_rightwidgeted">
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?> etc etc...

    and put a folder named js with the scriptfile in it in the
    themefolder and ofcourse uploaded the pictures in the images folder and called them in the script like this:

    fadeimages[0]="../images/miniervaringen.jpg" etc...

    but nothing happens.

    I tried to put an extra div around it too but that seems nothing to do with it.

    What am i doing wrong.

    ps. I read the documentation about it...

    Thanks in advance, sasole

  2. yoshi
    Member
    Posted 7 years ago #

    Maybe the path to .js file isn't correct.

    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/fotos.js"></script>

Topic Closed

This topic has been closed to new replies.

About this Topic