Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS AnythingSlider and wordpress: <script> confusion

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #25810
    dmhoro
    Member

    I’ve been able to hack the anything slider when it’s on its own page: http://drhorowitz.biz/slider/example.html

    But, when I try to move this hack to the right sidebar of my wordpress blog http://drhorowitz.biz/ (upper right corner), I get problems.

    I’m still a noob at all this. I don’t know exactly when to call the various jquery <script> tags.

    In the <head> section of my header.php file I call:

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script&gt;

    In the <body> section of my header.php file I call:

    <script type="text/javascript" src="js/jquery.easing.1.2.js"></script>
    <script src="js/jquery.anythingslider.js" type="text/javascript" charset="utf-8"></script>

    Then, in my header.php file I reference the sidebar where the AnythingSlider html is located <?php include (TEMPLATEPATH . ‘/videosidebar.php’); ?>

    In my videosidebar.php file I call:

    <script type="text/javascript">

    function formatText(index, panel) {
    return index + "";
    }

    $(function () {

    $(‘.anythingSlider’).anythingSlider({
    easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin
    autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not.
    delay: 3000, // How long between slide transitions in AutoPlay mode
    startStopped: false, // If autoPlay is on, this can force it to start stopped
    animationTime: 600, // How long the slide transition takes
    hashTags: true, // Should links change the hashtag in the URL?
    buildNavigation: true, // If true, builds and list of anchor links to link to each slide
    pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover
    startText: "Go", // Start text
    stopText: "Stop", // Stop text
    navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
    });

    $("#slide-jump").click(function(){
    $(‘.anythingSlider’).anythingSlider(6);
    });

    });
    </script>

    Please help!

    #62430
    dmhoro
    Member

    Okay, just read this and made changes…

    http://digwp.com/2009/06/including-jque … right-way/

    now in the <head> section:

    script type="text/javascript"
    src="<?php bloginfo("template_url"); ?>/js/jquery.easing.1.2.js"></script>
    <script type="text/javascript"
    src="<?php bloginfo("template_url"); ?>/js/jquery.anythingslider.js"></script>

    <script type="text/javascript">

    function formatText(index, panel) {
    return index + "";
    }

    $(function () {

    $(‘.anythingSlider’).anythingSlider({
    easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin
    autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not.
    delay: 3000, // How long between slide transitions in AutoPlay mode
    startStopped: false, // If autoPlay is on, this can force it to start stopped
    animationTime: 600, // How long the slide transition takes
    hashTags: true, // Should links change the hashtag in the URL?
    buildNavigation: true, // If true, builds and list of anchor links to link to each slide
    pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover
    startText: "Go", // Start text
    stopText: "Stop", // Stop text
    navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
    });

    $("#slide-jump").click(function(){
    $(‘.anythingSlider’).anythingSlider(6);
    });

    });
    </script>

    #62433
    dmhoro
    Member

    Tried placing the <script> calls in the videosidebar and that didn’t work either:

    <div id="videosidebar">

    <script type="text/javascript"
    src="<?php bloginfo("template_url"); ?>/js/jquery.easing.1.2.js"></script>
    <script type="text/javascript"
    src="<?php bloginfo("template_url"); ?>/js/jquery.anythingslider.js"></script>

    <script type="text/javascript">

    function formatText(index, panel) {
    return index + "";
    }

    $(function () {

    $(‘.anythingSlider’).anythingSlider({
    easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin
    autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not.
    delay: 3000, // How long between slide transitions in AutoPlay mode
    startStopped: false, // If autoPlay is on, this can force it to start stopped
    animationTime: 600, // How long the slide transition takes
    hashTags: true, // Should links change the hashtag in the URL?
    buildNavigation: true, // If true, builds and list of anchor links to link to each slide
    pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover
    startText: "Go", // Start text
    stopText: "Stop", // Stop text
    navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
    });

    $("#slide-jump").click(function(){
    $(‘.anythingSlider’).anythingSlider(6);
    });

    });
    </script>

    <div class="anythingSlider">

    #62435
    dmhoro
    Member
    #62438
    Chris Coyier
    Keymaster

    Sometimes just posting to the forums and describing your problems can help you solve them all by yourself =)

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.