0

I have been on this for about 6 hours now. I processed it through several Lint tools and various other online tests, and I cannot get the below statement to close properly. There is a persistent error being generated on the last line, Lint says a } is required, I tried that among many other variations of }, )} }) w/ and w/out ; and many other variations of 2x 3x or more closing brackets, parentheses and semi-colons. I checked and rechecked all opening and closing statements to ensure they match up. I assume I am just not seeing something!

If a fresh set of eyes can look at this and see what I am missing and doing wrong.

(function ($) {
"use strict";

var slider = null;

$(document).on("mouseover", '.bb_menu_item', function () {
    slider.stopAuto();
    slider.goToSlide($(this).attr('index'));
});

$(document).on("mouseout", '.bb_menu_item', function () {
    slider.startAuto();
});

$(document).ready(function () {
    if ($('#bbSlider').length) {
        slider = $('#bb_slider').bxSlider({
            controls: false,
            pager: false,
            auto: true,
            slideWidth: 1030,
            responsive: true,
            mode:"fade" 
        });
    } 

        $('.tab-linker').click(function () {
        window.location.href = 'http://t.com/?page_id=1302#tab-id-2';
        //return false;
        location.reload(false);
    });

    // Custom homepage slider
    $(".slider-home").click(function (event) {
        event.preventDefault();
        window.location = "http://t.com/";
    });


    //
    $(".slider-services").click(function (event) {
        event.preventDefault();
        window.location = "http://t.com/?page_id=1302";
    });
    //
    $(".slider-gallery").click(function (event) {
        event.preventDefault();
        window.location = "http://t.com/?page_id=73";
    });
    //
    $(".slider-about").click(function (event) {
        event.preventDefault();
        window.location = "http://t.com/?page_id=2";
    });
    //
    $(".slider-contact").click(function (event) {
        event.preventDefault();
        window.location = "http://t.com/?page_id=1167";
    });
    //
    $(".slider-links").click(function (event) {
        event.preventDefault();
        window.location = "http://t.com/?page_id=2565";
    }); 
}); 
OldWest
  • 2,355
  • 7
  • 41
  • 61
  • See examples here: http://stackoverflow.com/questions/6090912/javascript-self-executing-function-is-not-a-function – jwatts1980 Oct 02 '15 at 22:30

1 Answers1

5

Given that your program starts with (function() { (without indentation!), you will need to close your IEFE with a

}());

in the end (after the existing }); that matches the $(document).ready(function () {).

Bergi
  • 630,263
  • 148
  • 957
  • 1,375