views:

30

answers:

1

Hello, I'm pretty new with JQuery, I'm trying to get this script to work. I'm trying to create a rotator on the homepage of a clients website but I can't get it to run! I get no errors, the files are were they're supposed to be, I can't for the life of me figure out what the problem is!

Here's a snipped of the code:

<script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
<script src="jquery.bxSlider.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
    $("form#newsletter-form").submit(function () {
        $.post("/newsletter.ajax.php", {
            action: 'subscribe',
            email: $("form#newsletter-form input#email").val()
        }, function (json) {
            if (json.success == true) {
                $("div.form-container").empty().append("<p>Thank you for submitting your info.</p>");
            } else {
                alert(json.error);
            }
        }, 'json');
        return false;

        $(function () {
            $('#show-options').click(function () {
                $('#options').slideToggle();
                $(this).toggleClass('open');
                return false;
            });
        });

        $('#slider1').bxSlider({
            infiniteLoop: false,
            auto: true,
            pager: true
        });
    });
});
</script>

The slider is what I'm trying to get to run, I wonder if the problem has to do with the function above it or if there's a conflict.

Thank You.

A: 

It is most likely because the src to your slider script is not correct:

<script src="jquery.bxSlider.min.js" type="text/javascript"></script>

======================^ It isn't valid path
Sarfraz
The path is correct, here's the website - petconn.blackdogstaging.com
Corey
@Corey: Are you using any other js library other than jQuery on your page?
Sarfraz
Sorry I'm new at this here's the whole header:
Corey
<?php ini_set('include_path', '.:/usr/local/lib/php/:/usr/share/pear');require_once('scripts/nav.php');?> that just brings in the nav i believe
Corey