Custom basic .js from theme dir prevents Splashify module from working I am using latest Drupal 7 with latest Splashify version. Splashify (Splash in D6) is a simple module that uses jStorage js (from libraries/ dir) to add a splash/intro page for your Drupal site. So i.e. user enters my site and it gives him some intro splash page with like links to Enter site or Leave and etc. And that page is any node who's path/alias is chosen as a splash page. More about Splashify drupal.org/project/splashify

Now I found out that this module is not working because of some basic js my theme has. I tried on default Bartik and the module works just fine.

The problem is I am not js developer and don't know what's the problem. So I only managed to track down the problem.

There's the code, maybe someone knows what might be the issue, it's jQuery:

(function ($) {
  /* Slideshow */
  Drupal.behaviors.MYSITE = {
    attach: function (context, settings) {
      $(".carousel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev"                                
      });

      /* Rollover info */
      $(".block1").hover(function(){
        $(this).find("span.info").stop(false, true).fadeIn("fast");
      }, function(){
        $(this).find("span.info").stop(false, true).fadeOut("fast");
      });

      // Class for every 3rd row.
      $(".view-flavor-listings .views-row:nth-child(3n-3)").addClass("diff-margin");
      $(".view-content-inner .views-row:nth-child(5n-4)").addClass("diff-mrg");

      /* slidePager */
      $('.pages').slidePager({
        last:6,
        borders:1,
        change:function(n){
          var els=$('.thumbs li').removeClass('mrk')
          els.eq(n).addClass('mrk')
          els.eq(n+1).addClass('mrk')
          els.eq(n+2).addClass('mrk')
          $('.thumbs li').css('opacity',1)
          $('.thumbs li:not(.mrk)').css('opacity',1)
        }
      })
    }};

    // Make Plupload default.
    $('.filefield-sources-list').each(function() {
      $('a.filefield-source-plupload', this).trigger('click');
      $(this).hide();
    });
  })(jQuery);


To be exact it's that part:

/* slidePager */
$('.pages').slidePager({
  last:6,
  borders:1,
  change:function(n){
    var els=$('.thumbs li').removeClass('mrk')
    els.eq(n).addClass('mrk')
    els.eq(n+1).addClass('mrk')
    els.eq(n+2).addClass('mrk')
    $('.thumbs li').css('opacity',1)
    $('.thumbs li:not(.mrk)').css('opacity',1)
  }
})


Maybe its missing some () or {} or something like that. I remember I built that .js from surfing Google throughout.
Looks like simple syntax error :

(function ($) {
  /* Slideshow */
  Drupal.behaviors.MYSITE = {
    attach: function (context, settings) {
      $(".carousel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev"
      });

      /* Rollover info */
      $(".block1").hover(function(){
        $(this).find("span.info").stop(false, true).fadeIn("fast");
      }, function(){
        $(this).find("span.info").stop(false, true).fadeOut("fast");
      });

      // Class for every 3rd row.
      $(".view-flavor-listings .views-row:nth-child(3n-3)").addClass("diff-margin");
      $(".view-content-inner .views-row:nth-child(5n-4)").addClass("diff-mrg");

      /* slidePager */
      $('.pages').slidePager({
        last:6,
        borders:1,
        change:function(n){
          var els=$('.thumbs li').removeClass('mrk');
          els.eq(n).addClass('mrk');
          els.eq(n+1).addClass('mrk');
          els.eq(n+2).addClass('mrk');
          $('.thumbs li').css('opacity',1);
          $('.thumbs li:not(.mrk)').css('opacity',1);
        }
      });

      // Make Plupload default.
      $('.filefield-sources-list').each(function() {
        $('a.filefield-source-plupload', this).trigger('click');
        $(this).hide();
      });
    } // attach
  } // behavior
})(jQuery);