Aparece que "O objeto não dá suporte a propriedade ou método"
Scroller.Wheel = Scroller.extend ({
options: {
wheelspeed: 35,
onStart: Class.empty,
onStop: Class.empty,
hintcursor: false,
cursor: true,
knob: false,
velocity: 0.2
},
initialize: function (element, options) {
this.setOptions (options);
this.element = $(element);
//wheel
this.wheeler = this.wheeler.bindWithEvent(this);
this.element.addEvent ('mousewheel', this.wheeler);
//scroll
this.start = this.start.bindWithEvent(this);
this.stop = this.stop.bind(this);
this.switcher = this.switcher.bindWithEvent(this);
this.setCursor = this.setCursor.bind(this);
this.options.area = this.element.getStyle('height').toInt()/2; //use complete div to scroll
if (this.options.hintcursor)
this.setCursor (this.element, this.options.hintcursor, 'n-resize');
this.domel = $$(this.element);
this.domel.addEvent ('click', this.start);
//ext. knob
this.knob = false;
if (this.options.knob) {
this.knob = $(this.options.knob);
this.knob.addEvent ('click', this.switcher);
}
this.parent (this.element, this.options);
},
wheeler: function (event) {
this.element.scrollTop
= this.element.scrollTop - event.wheel * this.options.wheelspeed;
event.stop();
},
switcher: function (event) {
if (!this.scrolling) this.start(event);
else this.stop();
},
start: function(event) {
if (event.target != this.knob)
if (event.target.getTag()=='a' || event.target.parentNode.getTag()=='a')
return false; //don't start on link-events
if (this.options.cursor)
this.setCursor (this.element, this.options.cursor, 'n-resize');
this.parent(); this.scrolling = true;
this.domel.removeEvent ('click', this.start);
this.domel.addEvent ('mouseup', this.stop);
this.fireEvent('onStart', this.element);
},
stop: function() {
if (this.options.cursor) {
if (this.options.hintcursor)
this.setCursor (this.element, this.options.hintcursor, 'n-resize');
else this.setCursor (this.element);
}
this.parent(); this.scrolling = false;
this.domel.removeEvent ('mouseup', this.stop);
var temp = function() {this.domel.addEvent ('click', this.start);};
temp.delay (10,this);
this.fireEvent('onStop', this.element);
},
setCursor: function (el, cursor, altcur) {
if (!altcur) altcur = 'auto';
if (cursor && $type(cursor) == 'string') {
if (cursor.test('.')) { //a file?
el.setStyle ('cursor', altcur); //opera save
el.setStyle ('cursor', 'url('+cursor+'), '+altcur);
}
else el.setStyle ('cursor', cursor);
}
else el.setStyle ('cursor', altcur);
}
});
Scroller.Wheel.implement(new Events, new Options);
Na linha 58, caractere:3:
"if (event.target.getTag()=='a' || event.target.parentNode.getTag()=='a')"
Como posso resolver isso?
Já estou LOCO!
OBS: quando tiro um outro arquivo .js do site o aplicativo passa a funcionar direito.
- JeffMalm likes this