Skip to main content

All Questions

Tagged with
208 votes
11 answers
216k views

event.preventDefault() function not working in IE

Following is my JavaScript (mootools) code: $('orderNowForm').addEvent('submit', function (event) { event.preventDefault(); allFilled = false; $$(".required").each(function (inp) { ...
sv_in's user avatar
  • 14k
7 votes
1 answer
6k views

How to implement OnDestroy/OnDispose event in JS/Mootools?

Is there any existing OnDestroy/OnDispose event in JavaScript or are there any known custom implementations in plain JS or Mootools? Let's say I want to call console.log('bye') when an element gets ...
Slava's user avatar
  • 3,037
5 votes
1 answer
4k views

Mootools: inject vs adopt

I want to dynamically add some preconfigured HTML-Elements in use of a 'click'-event with mootools. So I can make it work with my basic knowledge, although it isn´t very nifty. I coded this so far... ...
Micha's user avatar
  • 53
3 votes
1 answer
432 views

Access class attribute in event handler in js-mootools

I have a JS object (working with mootools) wich has stored some DOM elements and attach to them event listeners: window.myObject = { init: function(el1ID, el2ID){ this.myElement1 = ...
Federinik's user avatar
  • 522
3 votes
2 answers
1k views

MooTools event listener disappears after element.innerHTML is changed

I am trying to achieve this task using MooTools. Description: I attached an event listener to myButton link. A click on this link initiates an AJAX request and updates myDiv content based on the ...
acoder's user avatar
  • 523
3 votes
1 answer
1k views

How to determine error code on broken images with mootools

I need a script that can determine the reason an image didn't load based on the HTTP status code supplied. I am aware of the onError event on images and objects, but it does not pass the error code. ...
eXtenZy's user avatar
  • 67
2 votes
1 answer
373 views

In jQuery how to fire an elements event added in mootools?

I have a MooTools script (please dont ask why..) where elements are added a mouseenter event. In jQuery, I open/show those elements within a fancybox. When it pops up, the mouseenter event wont get ...
Alex's user avatar
  • 10.1k
2 votes
2 answers
76 views

How to define an event that changes an element that has a different event?

Apologies for the vague title, it's kind of hard to explain in a line... In any case, let's say I have a button with an action as defined by the data-action property. When the user clicks said button,...
Julian H. Lam's user avatar
2 votes
1 answer
606 views

mootools | Open/close popup menu and outer click event

I'm using mootools and working on popup menu: document.getElement('.cart a').toggle( function() { this.getParent('div').removeClass('open'); this.getNext('.cart_contents').hide(); ...
XTRUST.ORG's user avatar
  • 3,374
2 votes
1 answer
780 views

Mootools: how fired a function (or more functions) after the end of a tween or morph FX or other event?

as title, I would to knoe how can I do to fired a function after the end of an event. Thanks!
Donovant's user avatar
  • 3,139
2 votes
2 answers
482 views

Event binding in MooTools like jQuery

Is there a way to assign a multiple event types in MooTools like jQuery? Mootools: $$('#id').addEvents({ keyup: fn, click: fn }); jQuery: $('#id).bind('keyup click' ,fn);
Algorithm's user avatar
  • 329
2 votes
1 answer
1k views

No Event object on Scroll Event in MooTools?

I am getting an undefined value for the event object that I think should be available in the callback for the addEvent() function. This is what I'm doing. element.addEvent('scroll', callback(event) {...
fraxture's user avatar
  • 5,384
2 votes
1 answer
83 views

how to control the back button with mootools?

This is how it looks for jQuery. How can I achieve the same thing with Mootools? $(window).on("navigate", function (event, data) { var direction = data.state.direction; if (direction == '...
Torsten's user avatar
  • 91
1 vote
2 answers
1k views

JavaScript event.target only reports child (MooTools)

I seem to get something fundamentally wrong. I have this HTML <div id="thumbnails"> <a href="#image-0"> <img src="blabla-1.jpg" /> </a> <a href="#image-...
maryisdead's user avatar
  • 1,810
1 vote
3 answers
2k views

how to attach onclick event to an array of elements (mootools)

Is there a syntax for the following thing: $$('.a-lot-of-elems').addEvent('someevent',somefunction);
Itay Moav -Malimovka's user avatar

15 30 50 per page
1
2 3 4 5