C,
pasted
on Oct 8:
|
// Slider Script
var count = 0;
var i = 1;
var j = 0;
var k = 0;
var l = 0;
var currentNum;
var currentBloxSec;
var currentSection;
var currentClass;
var currentClassName;
var timeDelay = 5000;
var featured = document.getElementById("featured");
var hovering = 0;
var lastClass;
var lastNum;
var theShowCount;
var featuredBusinessCount;
var paused = 0;
$('a.tab').removeClass('tabActive');
$('a.theShow.tab').addClass('tabActive');
currentClass = '.theShow1';
currentSection = '.theShow';
currentNum = 1;
currentBloxSec = theShowCount;
currentClassName = 'theShow';
lastClass = '.theShow1';
numBlox();
moveUpDown();
$('.theShow1').fadeIn("fast",function(){
var PlaySlide = setInterval("slider()", timeDelay);
$('#skipd').click(function() {
$('#pause').attr('src','images/play.png');
$('#pause').addClass('play');
paused = 1;
clearInterval(PlaySlide);
slider();
})
$('#pause').click(function() {
if(paused == 0){
$('#pause').attr('src','images/play.png');
clearInterval(PlaySlide);
paused = 1;
}else if(paused == 1){
$('#pause').attr('src', 'images/pause.png');
PlaySlide = setInterval("slider()", timeDelay);
paused = 0;
}
})
$('#back').click(function() {
$('#pause').attr('src','images/play.png');
$('#pause').addClass('play');
paused = 1;
clearInterval(PlaySlide);
slideBack = 1;
slider();
slideBack = 0;
})
$('.numBox').click(function(){
var clicked = $(this).attr("class");
var tempor = new Array();
tempor = clicked.split(' ')
lastClass = currentClass;
currentClass = currentSection + tempor[1];
currentNum = tempor[1];
count = tempor[1];
var changing = lastClass;
lastNum = changing.substring(changing.length - 1);
if(currentSection == '.theShow'){
i = tempor[1];
}else if(currentSection == '.featuredBusiness'){
j = tempor[1];
}
moveUpDown();
$(lastClass).fadeOut("slow",function(){
$(currentClass).fadeIn("slow")
});
lastClass = currentClass;
})
$('.tab').click(function(){
$('.tab').removeClass('tabActive');
$(this).addClass('tabActive');
var temp = $(this).attr('class');
var tmp = new Array();
tmp = temp.split(' ');
lastClass = currentClass;
currentSection = '.' + tmp[0];
if(currentSection == '.theShow'){
currentBloxSec = theShowCount;
i = 1;
j = 0;
k = 0;
l = 0;
}else if(currentSection == '.featuredBusiness'){
currentBloxSec = featuredBusinessCount;
i = theShowCount;
j = 1;
k = 0;
l = 0;
}
currentNum = 1;
numBlox();
$('.1').attr("id", "showing");
currentClass = currentSection + 1;
$(lastClass).fadeOut("slow",function(){
$(currentClass).fadeIn("slow")
});
lastClass = currentClass;
})
})
//Move Displayed block up or down
function moveUpDown(){
var b, moveUp, moveDown, shown;
if(count == 0){
$('.1').attr("id", "showing");
}
for(b=0; b <= currentBloxSec; b++){
if(b == currentNum){
moveUp = '.' + b;
moveDown = '.' + (lastNum);
$(moveUp).attr("id","showing");
$(moveDown).attr("id", " ");
moveDown = moveUp;
}
}
}
function numBlox(){
var a, nextBlock;
if(currentNum == 1){
$('.numBox').attr("id", "");
$('.numBox').hide();
for(a=1; a<=currentBloxSec; a++){
nextBlock = '.' + a;
$(nextBlock).show();
}
}
}
//Figure out which section we are currently on.
function whichSection () {
if(currentSection == '.theShow'){
currentNum = i;
lastNum = i-1;
currentBloxSec = theShowCount;
currentClassName = 'theShow';
$('a.tab').removeClass('tabActive');
$('a.theShow.tab').addClass('tabActive');
} else if(currentSection == '.featuredBusiness'){
lastNum = j-1;
currentNum = j;
currentBloxSec = featuredBusinessCount;
currentClassName = 'featuredBusiness';
$('a.tab').removeClass('tabActive');
$('a.featuredBusiness.tab').addClass('tabActive');
}
}
//This function will clear all of the links on featured menu of being active
function clearAll(){
}
//This function moves through each one of the divs.
function slider(){
count++;
if((i >= theShowCount) && (j >= featuredBusinessCount)){
i=0;
j=0;
k=0;
l=0;
}
//Can possibly do If Else statement to pause the loop. I think that would be best.
if(i < theShowCount){
i++;
currentSection = '.theShow';
currentClass = currentSection + i;
whichSection();
numBlox();
moveUpDown();
$(lastClass).fadeOut("slow",function(){
$(currentClass).fadeIn("slow")
});
lastClass = currentClass;
}else if(j < featuredBusinessCount){
j++;
currentSection = '.featuredBusiness';
currentClass = currentSection + j;
whichSection();
numBlox();
moveUpDown();
$(lastClass).fadeOut("slow",function(){
$(currentClass).fadeIn("slow")
});
lastClass = currentClass;
}
}
|
Output:
|
Line 5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'count'
Line 7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i'
Line 9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'j'
Line 11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'k'
Line 13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'l'
Line 15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'currentNum'
Line 17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'currentBloxSec'
Line 19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'currentSection'
Line 21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'currentClass'
Line 23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'currentClassName'
Line 25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'timeDelay'
Line 27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'featured'
Line 29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hovering'
Line 31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lastClass'
Line 33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lastNum'
Line 35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'theShowCount'
Line 37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'featuredBusinessCount'
Line 39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'paused'
Line 2: warning: character constant too long for its type
Line 43: error: expected declaration specifiers or '...' before '\x2e746162'
In function '$':
Line 43: error: expected declaration specifiers before '.' token
Line 23: warning: character constant too long for its type
Line 45: error: expected declaration specifiers before '$'
Line 2: warning: character constant too long for its type
Line 28: warning: character constant too long for its type
Line 47: error: expected declaration specifiers before 'currentClass'
Line 15: warning: character constant too long for its type
Line 49: error: expected declaration specifiers before 'currentSection'
Line 17: warning: character constant too long for its type
Line 51: error: expected declaration specifiers before 'currentNum'
Line 53: error: expected declaration specifiers before 'currentBloxSec'
Line 55: error: expected declaration specifiers before 'currentClassName'
Line 19: warning: character constant too long for its type
Line 57: error: expected declaration specifiers before 'lastClass'
Line 12: warning: character constant too long for its type
Line 59: error: expected declaration specifiers before 'numBlox'
Line 61: error: expected declaration specifiers before 'moveUpDown'
Line 77: error: expected declaration specifiers before '$'
Line 2: warning: character constant too long for its type
Line 3: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 19: warning: multi-character character constant
Line 25: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 23: warning: multi-character character constant
Line 3: warning: character constant too long for its type
Line 5: warning: character constant too long for its type
Line 20: warning: multi-character character constant
Line 26: warning: character constant too long for its type
Line 5: warning: character constant too long for its type
Line 20: warning: multi-character character constant
Line 27: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 19: warning: multi-character character constant
Line 25: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 23: warning: multi-character character constant
Line 3: warning: character constant too long for its type
Line 23: warning: character constant too long for its type
Line 29: warning: character constant too long for its type
Line 3: warning: multi-character character constant
Line 4: warning: multi-character character constant
Line 24: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 26: warning: character constant too long for its type
Line 23: warning: character constant too long for its type
Line 29: warning: character constant too long for its type
Line 4: warning: multi-character character constant
Line 325: error: expected declaration specifiers before ')' token
Line 4: warning: multi-character character constant
Line 381: error: expected declaration specifiers before 'function'
Line 4: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 407: error: expected declaration specifiers before 'function'
Line 22: warning: character constant too long for its type
Line 21: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 25: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 30: warning: character constant too long for its type
Line 29: warning: character constant too long for its type
Line 21: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 25: warning: character constant too long for its type
Line 4: warning: character constant too long for its type
Line 39: warning: character constant too long for its type
Line 449: error: expected declaration specifiers before 'function'
Line 459: error: expected declaration specifiers before 'function'
Line 19: warning: character constant too long for its type
Line 19: warning: character constant too long for its type
Line 533: error: expected '{' at end of input
|
|