All Questions
66
questions
1
vote
3
answers
325
views
Avoid anonymous function in Mootools?
Here's my problem: I'm looking for a way to work with 'not anonymous' function in Mootools.
Can't find a way to work it out, and I couldn't find doc about it.
Example:
var myInput = new Element('...
0
votes
3
answers
1k
views
How to trigger event on dynamically generated elements (in mootools)
Example to demonstrate the issue can be found here:
http://jsfiddle.net/Byyu2/
As you can see only the first "Add" button triggers an event. The dynamically generated button does not. This is ...
1
vote
3
answers
3k
views
Event removal in Mootools, and syntax of event addition
So I have been adding my events thusly:
element.addEvent('click', function() {
alert('foobar');
});
However, when attempting to remove said event, this syntactically identical code (with "add" ...
1
vote
1
answer
5k
views
Mootools doesn't fire the "onChange" event for Selects in IE7
I'm working with MooTools 1.2.4 and I have a select with an event "change" that works fine in Firefox but when I try to test it in Internet Explorer 7 it gives me an error saying that the ...
0
votes
1
answer
125
views
Can someone explain jQuery's addEvents feature?
I saw this code on someone else's website, but found no reference to it on jQuery's site.
window.addEvents({
'domready': resizer,
'resize': resizer
});
Can either: someone point me to the ...
1
vote
1
answer
478
views
Adding custom code to mootools addEvent
Even though I've been using mootools for a while now, I haven't really gotten into playing with the natives yet. Currently I'm trying to extend events by adding a custom addEvent method beside the ...
1
vote
2
answers
599
views
Dom Element onclick (MooTools :: optionally)
Consider the following example:
function async_callback(array1, array2, array3) {
// All arrays are equal length
for(var i = 0; i < array1.length; i++) {
var myElement = new Element('div',...
1
vote
2
answers
1k
views
MooTools request fails
I am trying to achieve this task using MooTools.
Description:
I have three buttons. Two buttons outside myDiv and one button inside myDiv.
A click on any of these buttons initiates an AJAX request (...
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 ...
0
votes
1
answer
2k
views
Emulate domready event with a custom event (mootools)
I need to fire a one time only custom event that functions like the domready event, in that if new events are added after the event has occurred they are fired immediately.
This is for some code that ...
1
vote
1
answer
1k
views
Mootools 1.2.4 delegation not working in IE8...?
So I have a listbox next to a form. When the user clicks an option in the select box, I make a request for the related data, returned in a JSON object, which gets put into the form elements. When the ...
0
votes
2
answers
2k
views
MooTools events not firing in IE8
I have a Mootools asset created like so:
// Create a new asset
var asset = new Asset.image(path, {
title: this.language.download,
events: {click: this.download.bind(this, link)},
});
I have ...
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);
0
votes
1
answer
280
views
MooTools: Attaching to destroy() event
There's a div element on my page. When the page loads, I want to specify somehow that after destroy() is called on this element (based on what the user does in the UI), that a function I specify fires....
0
votes
1
answer
503
views
JavaScript, MooTools and variable/object scope
I might be using the wrong patterns here, but if I am, I hope someone can correct me!
I have an object which represents a user's workspace and, in response to a server action, it clones a div, ...