Hi Paul
So to swap to your code first, I change the code below:
Code:
(function () {
var index = 0,
nav = document.getElementById('menuNav'),
links = nav.getElementsByTagName('a');
// change the links from a live nodeList to an array
links = Array.prototype.slice.call(links);
links.shift(); // remove the first link - the left arrow
links.pop(); // remove the last link - left arrow
To this is it.
Code:
(function () {
function convertToArray(obj) {
var arr = new Array(seq.length),
i;
for (i = 0; i < seq.length; i += 1) {
arr[i]= seq[i];
}
return arr;
}
var index = 0,
nav = document.getElementById('menuNav'),
links = nav.getElementsByTagName('a');
// change the links from a live nodeList to an array
links = convertToArray(links);
links.shift(); // remove the first link - the left arrow
links.pop(); // remove the last link - left arrow
And yes by the seems your right, its saying done but with errors in the bottom left, but its not giving too much feedback to work out exactly where it is.
All I can get from it is this:
Line 2 char 2 in the code below, is one of the errors.
Code:
window.addEvent("domready",function(){
$('enviar').addEvent("click",function(e){
e = new Event(e);
//stop propagation
if(!$('response').hasClass("loading")) $('response').addClass("loading");
$('contacto').setStyle("display","none");
$('response').setStyle("display","block");
var myAjax = new Ajax('mailer.php', {
data:$('consulta'),
update:$('response'),
onComplete:function(){
var desaparecer = new Fx.Style('response', 'opacity', {duration:3000});
if($('response').hasClass("loading")) $('response').removeClass("loading");
desaparecer.start(1,0).addEvent("onComplete",function(){
$('response').setStyle("display","none");
$('response').setStyle("opacity","1");
$('response').empty();
$('contacto').setStyle("display","block");
}); //margin-top is set to 10px immediately
}
}).request();
})
})
//Tooltips
var Tips2 = new Tips($$('.tooltip'), {
initialize:function(){
this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 300, wait: false}).set(0);
},
onShow: function(toolTip) {
this.fx.start(1);
},
onHide: function(toolTip) {
this.fx.start(0);
}
});
// SiFR
//<![CDATA[
if(typeof sIFR == "function"){
sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"sifr/sifr.swf", sColor:"#000000", sLinkColor:"#FFFFFF", sBgColor:"#000000", sHoverColor:"#CCCCCC", sWmode:"transparent",sFlashVars:"textalign=right"}));
};
//]]>
var scroll = new Fx.Scroll('slider', {
wait: false,
//duration: 2500,
duration: 2000,
offset: {'x': 0, 'y': 0},
transition: Fx.Transitions.Sine.easeInOut
});
$('link1').addEvent('click', function(event){
event = new Event(event).stop();
scroll.toElement('content1');
});
$('link2').addEvent('click', function(event) {
event = new Event(event).stop();
scroll.toElement('content2');
});
$('link3').addEvent('click', function(event) {
event = new Event(event).stop();
scroll.toElement('content3');
});
$('link4').addEvent('click', function(event) {
event = new Event(event).stop();
scroll.toElement('content4');
});
Bookmarks