0

I have a site that needs to go live by Monday and has experienced sudden issues in main homepage components. Any help would be greatly appreciated!

Yesterday, everything worked fine. I undid the changes from yesterday, but the issue did not correct itself, even after clearing the cache.

The site is: http://pinnaclejobswinnipeg.com

Problem 1: There is a tab content slider in the middle area of the homepage. Since today (though it worked fine the past month), the script breaks when you click a tab.

The error is:

Uncaught TypeError: Property 'undefined' of object # is not a function

  • This error occurs in jQuery.easing.1.3.js, which is loaded by the Wordpress theme's (uDesign) content slider at the top of the page.
  • The top slider continues to work fine, regardless of the bottom tab-slider being broken.
  • If I remove the tab-slider, the error vanishes.
  • If I remove the top slider, the tab-slider works again, with no error (because the easing JS is not loaded).

I can't figure for the life of me what has gone wrong, nor can I find anything helpful when I search.

Problem 2:

  • The tab-slider script works in every browser fine, but breaks inexplicably in (surprise...) IE7.
  • NOTE: The site element is actually two tab sliders, which are themselves fired by tabs (Tab: Executive Search - calls one set of sliding tabs || Tab: Staffing - calls another set of sliding tabs). The script for each tab set is basically the same, with different CSS calls.

The Script(s) in Question:

  • Tab Slider 1

    var j = jQuery.noConflict();

j(document).ready(function(){

var doIsSliding;
var itemNumber;
var itemWidth = 750;
var holderLength = j(".changeme .changeContentItem");
var holderWidth = 200 * holderLength;
var animSpeed = 400;
var currentChange, currentChangeLink;

// init
j(".changeme .changeContent").css("width",itemWidth+"px");
j(".changeme .changeContentItem").css({"display":"none","position":"absolute"});
j(".changeme .changeContentItem:first").css("display","block").addClass("change-active");
j(".changeme .changing ul a:first").addClass("change-active");

j(".changeme .changing ul a").bind("click", function() {
    if (doIsSliding != true) {
        itemNumber = j(this).attr("rel");
        currentChange = j(".changeme #contentItem"+itemNumber);
        // if not current item
        if (!currentChange.hasClass("change-active")) {
            doIsSliding = true;
            // clear prev
            j(".changeme .changing ul a").removeClass("change-active");
            // slide down current
            currentChangeLink = j(this);
            currentChangeLink.addClass("change-active");
            currentChange.css({"opacity":"0","left":itemWidth+"px","display":"block"})
                .animate({
                    left: '20',
                    opacity: 1,
                },animSpeed,function(){
                    currentChange.addClass("change-active");
                    j(".changeme .changeContentItem").css("display","none");
                    j(".changeme .changeContent .change-active").css("display","block");
                    doIsSliding = false;
            });
            j(".changeme .changeContent .change-active").css({"opacity":"1","left":"0px","display":"block"}).addClass("last-active")
                .animate({
                    left: '-'+itemWidth,
                    opacity: 0
                },animSpeed,function(){
                    j(".changeme .changeContent .last-active.change-active").css("display","none").removeClass("last-active").removeClass("change-active");
                    doIsSliding = false;
            });
        }
    }
});

});

  • Tab Slider 2

    var j = jQuery.noConflict();

j(document).ready(function(){

var doIsSliding;
var itemNumber;
var itemWidth = 750;
var holderLength = j(".change2 .changeContentItem");
var holderWidth = 200 * holderLength;
var animSpeed = 400;
var currentChange, currentChangeLink;

// init
j(".change2 .changeContent2").css("width",itemWidth+"px");
j(".change2 .changeContentItem").css({"display":"none","position":"absolute"});
j(".change2 .changeContentItem:first").css("display","block").addClass("change-active");
j(".change2 .changing ul a:first").addClass("change-active");

j(".change2 .changing ul a").bind("click", function() {
    if (doIsSliding != true) {
        itemNumber = j(this).attr("rel");
        currentChange = j(".change2 #contentItem"+itemNumber);
        // if not current item
        if (!currentChange.hasClass("change-active")) {
            doIsSliding = true;
            // clear prev
            j(".change2 .changing ul a").removeClass("change-active");
            // slide down current
            currentChangeLink = j(this);
            currentChangeLink.addClass("change-active");
            currentChange.css({"opacity":"0","left":itemWidth+"px","display":"block"})
                .animate({
                    left: '20',
                    opacity: 1
                },animSpeed,function(){
                    currentChange.addClass("change-active");
                    j(".change2 .changeContentItem").css("display","none");
                    j(".change2 .changeContent2 .change-active").css("display","block");
                    doIsSliding = false;
            });
            j(".change2 .changeContent2 .change-active").css({"opacity":"1","left":"0px","display":"block"}).addClass("last-active")
                .animate({
                    left: '-'+itemWidth,
                    opacity: 0
                },animSpeed,function(){
                    j(".change2 .changeContent2 .last-active.change-active").css("display","none").removeClass("last-active").removeClass("change-active");
                    doIsSliding = false;
            });
        }
    }
});

});

Thank you so much for any help you can provide!

Bobby

Bobby
  • 1

1 Answers1

0

opening the site I get the following error directly:

$("a[rel^='wp-prettyPhoto'], a[rel^='prettyPhoto']").prettyPhoto is not a function [Parar en este error]

It produces into the line 80 of http://pinnaclejobswinnipeg.com/wp-content/themes/u-design/scripts/prettyPhoto/custom_params.js?ver=3.1.3 file.

After execute the selector $("a[rel^='wp-prettyPhoto'], a[rel^='prettyPhoto']"), I got that [] as result.

I don't if this is the origin of your problem, but this is wrong.

Kind regards

SeVeNDuS
  • 268
  • 1
  • 2
  • 6
  • Thanks for the reply! That is something that has always come up (an error in the theme). It appears to be unrelated. Appears. I had the top slider turned off, but it is on now. If you click on the tabs near the bottom, you will see the error I am referring to. – Bobby Jun 14 '12 at 15:21
  • I turned off the pretty photo script to be sure. No change. :( – Bobby Jun 14 '12 at 15:23
  • Turns out that the first problem was related to jQuery-UI. I still have no idea why it happened, but **Problem 1** is fixed! (yay!) Just needed to add: `` ***The IE7 break is still an issue, though. Any takers?*** – Bobby Jun 14 '12 at 15:54
  • To make things more fun -- the fixing of Problem 1, as above, has completely destroyed the tab slider in IE7. It now puts the two sliders one above the other, and nothing works. *sigh* – Bobby Jun 14 '12 at 16:00
  • Decided to say screw it and add ChromeFrame. Hate forcing users to install something, but it beats the IE crap. – Bobby Jun 14 '12 at 18:08