There is no method Element.remove(). Only Element.dispose() (which removes
it from the DOM, but it can be injected again later; it still exists) and
Element.destroy() which removes it from memory entirely. The destroy method
obviously removes any events attached to it.
On Tue, Apr 14, 2009 at 6:3
secondListNode.getElementById("title"), it find the element not in
secondListNode but in secondListNode.ownDocument, you can see
Mootools' code. In you example, secondListNode.ownDocument is the same
as document, but in one page, id can't be reduplicated, so it will
return null. In mootools' tutor
remove() only removes the element but the events stay in memory so before
you call remove() call removeEvents() also on the element
-Original Message-
From: mootools-users@googlegroups.com
[mailto:mootools-us...@googlegroups.com] On Behalf Of electronbender
Sent: Wednesday, 15 April 2009
Can I propose a new method of called enableClass? Makes
certain code much more compact.
... ..
enableClass: function(className, isEnabled) {
(isEnabled) ? this.addClass(className) : this.removeClass
(className);
},
... ..
Thanks all for the replies. I think you are right. Probably safer to
use selectors.
I guess it would be possible to iterate through all of the children of
the containing node to find the first node with that id but I
guess that's quite expensive.
On Apr 15, 12:12 am, keif wrote:
> Dimitar:
So I've been using a ported version of phatfusion's multibox with the
overlay script.
http://phatfusion.net/multibox/
Only issue is, the overlay isn't overlaying IE6 select boxes.
The overlay code was barely touched (if at all) in conversion to 1.2,
as the multibox iframe (the one with the conte
I'm not sure how your using Drag.Move but I would recommend giving Scroller
a try. Harald has this page
http://digitarald.de/playground/fly-over-background/ it would probably take
some work but should give you a good starting point. A while back I did some
testing using background-position but foun
I'm not sure if this is a limitation of the browser or how mootools is
handling the drag. I have it setup so there is a large image,
2048x1536, that loads and is inside a window. Sort of like a popup
image viewer for large images. Anyway, when panning the image around,
its very slow. the viewa
I'm assuming you're getting this data from a database, why not shuffle
it in the query?
mysql example: "SELECT * FROM products ORDER BY RAND()"
On Apr 12, 9:00 am, Rolf wrote:
> I don't want a random item, but I want to shuffle the order.
> I loop through the whole thing and show it as thumbnail
Ok, what i've done is do a removeEvents before setting the event, so
that appears to work.
On Apr 14, 4:52 pm, Thierry bela nanga wrote:
> I think remove does the same as dispose,
> it remove the element from the DOM.
>
> 2009/4/14 Fábio Costa
>
>
>
> > remove sould be equal to dispose.
> > Isn
its set( 'checked', true / false )
in regular javascript you would do myelement.checked = true / false;
On Apr 10, 2:56 am, snillo wrote:
> Hi all,
>
> has someone an idea why this code doesn't work? is this a bug?
>
> var test = new Element("input", {
> "type": "checkbox",
> "events":
I think remove does the same as dispose,
it remove the element from the DOM.
2009/4/14 Fábio Costa
> remove sould be equal to dispose.
> Isn't it?
>
>
> Fábio Miranda Costa
> Engenheiro de Computação
> http://meiocodigo.com
>
>
> On Tue, Apr 14, 2009 at 11:45 AM, electronbender <
> ognen.plavev.
remove sould be equal to dispose.
Isn't it?
Fábio Miranda Costa
Engenheiro de Computação
http://meiocodigo.com
On Tue, Apr 14, 2009 at 11:45 AM, electronbender
wrote:
>
> No dispose in 1.11 :(
>
> On Apr 14, 4:44 pm, Fábio Costa wrote:
> > Don't know moo 1.1 :S
> > But looks like a dispose, s
No dispose in 1.11 :(
On Apr 14, 4:44 pm, Fábio Costa wrote:
> Don't know moo 1.1 :S
> But looks like a dispose, so maybe i've helped.
>
> Fábio Miranda Costa
> Engenheiro de Computaçãohttp://meiocodigo.com
>
> On Tue, Apr 14, 2009 at 11:42 AM, electronbender
> wrote:
>
>
>
> > Using moo 1.11..
Don't know moo 1.1 :S
But looks like a dispose, so maybe i've helped.
Fábio Miranda Costa
Engenheiro de Computação
http://meiocodigo.com
On Tue, Apr 14, 2009 at 11:42 AM, electronbender
wrote:
>
> Using moo 1.11..
> I just checked and i do a .remove() on the parent div.
>
> On Apr 14, 4:16 pm,
Using moo 1.11..
I just checked and i do a .remove() on the parent div.
On Apr 14, 4:16 pm, Fábio Costa wrote:
> Are you destroying or disposing the element?
> There are 2 methods to remove elements from the DOM, destroy() and
> dispose().
> destroy() removes the element from the DOM and really
Are you destroying or disposing the element?
There are 2 methods to remove elements from the DOM, destroy() and
dispose().
destroy() removes the element from the DOM and really destroy it and its
references and, i think, everything related to it (events included).
dispose() removes the element from
Dimitar:
You're right to an extent.
For example, if you have:
$('description') in IE will grab the meta tag.
-kb
On Apr 14, 6:31 am, Dimitar Christoff wrote:
> > I am not sure if (1) is a big deal since they are treated as strings. i
>
> oh, i thought it mattered for IE, the rule of thumb
I create a dropdown, and add a change event to it.
Then i destroy the element.
After a while i recreate it (same id, same name), and add the same
change event to it.
However, when i actually fire the change event this time around, it is
fired twice!
So, every time i delete, re-create it, and ad
id="length" won't work either, because of that node mapping, it will bug.
document.forms[0].length ?!?!
got it?
Fábio Miranda Costa
Engenheiro de Computação
http://meiocodigo.com
On Tue, Apr 14, 2009 at 7:31 AM, Dimitar Christoff wrote:
>
> > I am not sure if (1) is a big deal since they ar
Hello,
I wonder if there is a simple way to start different methods depending
on how much time passed between events.
example:
I have two textareas on a form. I added some functionality to the
'keydown' event.
$$('textarea').each(function(item) {
item.addEvent('keydown
> I am not sure if (1) is a big deal since they are treated as strings. i
oh, i thought it mattered for IE, the rule of thumb is to steer clear of
ids like name, description, title etc.
for instance,
in a doc with a ,
document.getElementById("description") won't reference the textarea in
IE, i
Hello mootoolers,
I've been trying to resolve this on and off for some time now.
Any pointers would be greatly appreciated.
I start the slideshow with this inside of a :
window.addEvent('domready', function() {...
var ssShow".$this->show_id." = new Slideshow(this.el, null,{.
I start the s
23 matches
Mail list logo