Wow - imagine MooTools as a collection of transforms that turns into code
that uses whatever libs are currently the norm/performs best!
On Friday, January 10, 2014 7:13:24 PM UTC+1, Christoph Pojer wrote:
>
> Hey,
>
> since ECMAScript 6 (the next version of JavaScript) is going to have
> classes
None of the popular CMS's have learned their lesson; not to have tight
couplings between their framework and a third party library. Joomla got
into trouble having chosen MooTools - and is now doing the same mistake
with jQuery; they are solving the wrong problem. History _will_ repeat
itself..
Good to see (hear?) MooTools getting some publicity :D
http://javascriptjabber.com/049-jsj-mootools-with-valerio-proietti-and-arian-stolwijk/
--
---
You received this message because you are subscribed to the Google Groups
"MooTools Users" group.
To unsubscribe from this group and stop receiv
Well, by principal I'm refraining from writing actual working code for you.
I want you to write your town code and learn that way.
There's one big oversight in your script that I've noticed just now; your
IIFE is just a FE - It never gets Immediately Instantiated.
You've got:
var Player =
That is incorrect... po.Player does not exist and therefore the code fails
at that point. po.remove doesn't exist either - which would also make the
code fail (just like po.Player) - but the code never gets to this part
because of the missing po.Player.
But po.setStage on the other hand DOES ex
remove methods.
(I don't really know what you want with the Player method - so I'll ignore
that :D )
You need to add the remove method to the Player.prototype to expose it.
On Saturday, February 23, 2013 9:21:00 AM UTC+1, Hamburger wrote:
>
> thx rasmusfl0e,
> I understand your h
Bind returns a new function which means that a function and a bound version
of that same function isnt the same:
function foo () {}
var bar = {};
var boundFoo = foo.bind(bar);
console.log(foo === boundFoo); // false
This means in order to add and remove bound functions on ev
np :)
On Wednesday, December 12, 2012 3:22:09 AM UTC+1, Mushr00m wrote:
>
> Thanks guys for the help !
> @Sanford Whiteman = I now that a jsFiddle is always a good help for
> understanding the subject but in my case it's a bit to complex to recreate
> it outside my project
I'm guessing the code you've shown is run on domready or on load? Your
routine is only going to do stuff to divs that are actually present at that
particular time. No divs - no setup.
So what you need to do is run the setup function on the divs as you add
them.
On Tuesday, December 11, 2012 5
You've only loaded MooTools in the iframe which means only the natives
(Element, String, Array etc) in the iframe are extended with MT goodness -
while they aren't in the outer frame.
On Thursday, November 15, 2012 4:33:47 PM UTC+1, hartum wrote:
>
> Hi Again, I foun in jQuery is so simple to
Wooot! :)
Sadly I missed your talk streaming online *damn* - though I did see some
guy named "Emily Rose"(?) give a talk on realtime hardware. Crazy stuff.
On Monday, November 12, 2012 6:35:43 AM UTC+1, jdalton wrote:
>
> Just wanted to let you all know MooTools got some love at CascadiaJS.
> I
You're missing a bind on the each loop in the slide method:
this.headings.each( function(heading, i, el) {
// yada yada
}.bind(this));
On Thursday, September 13, 2012 12:09:07 AM UTC+2, Douglas Machado wrote:
>
> @rasmusfl0e,
>
> Thanks for your reply, however it did not
If you use the this keyword in events you'll most likely need to bind thisto
the event function - like so:
heading.addEvent('click', function(){
// yada yada
this.hideAll(i);
// yada yada
}.bind(this));
It's basically also what's giving you that TypeError when you try to fire
Slider.initi
Yeah - it's basically a question of using the var keyword ;)
The dt*** vars need to be available for all the functions declared inside
your IIFE - and the rest just need to be declared inside their respective
encolsing functions.
And then there's Element::store; it only recieves a key and a val
Hmmm, maybe I'm missing something - but sometimes your for-loops run to 8
and sometimes to 7... is that on purpose. It would explain "index out of
range" type errors.
also you can make everything easier on yourself by letting your php script
return some cleanr/meaner json:
[
[5,4,4,4,4,4,4
Bret makes nice stuff with MooTools - some incredibly immediate and
intuitive interfaces.
http://vimeo.com/36579366
stopPropagation perhaps?
http://mootools.net/docs/core/Types/DOMEvent#DOMEvent:stopPropagation
Paul Irish linked up this on G+: http://www.ultranoir.com/en/#!/home/
Shows you don't need Flash anymore... you need MooTools :D
The markup is terrible though (divs just replaced with section tags - lol) -
but the site _is_ very flashy.
h HTML. Or maybe they
> do---I haven't tried it. But I wouldn't want to trust that without it
> being tested.)
>
> G
>
> On Feb 19, 10:25 am, rasmusfl0e wrote:
>
> > Even faster:http://jsperf.com/moo-hasclass-alternative/4:D
>
> > On Feb 18, 5:48 pm, A
Even faster: http://jsperf.com/moo-hasclass-alternative/4 :D
On Feb 18, 5:48 pm, Arian Stolwijk wrote:
> Even faster:http://jsperf.com/moo-hasclass-alternative/3
>
> On Fri, Feb 18, 2011 at 4:37 PM, Ryan Florence wrote:
> >http://jsperf.com/moo-hasclass-alternative
>
> > Yeah, it appears to be f
15 am, Garret Wilson wrote:
> On Feb 18, 7:38 pm, rasmusfl0e wrote:
>
> > You might get better results using an actual XHTML doctype...
>
> That is an actual XHTML doctype.
> See:http://www.w3.org/TR/html5/syntax.html#the-doctype
>
> It's not a doctype of XHTML 1.0
You might get better results using an actual XHTML doctype... There's
no telling how browsers will react combining an xml declaration with
an HTML5 doctype (HTML5!=xml).
You might want to stay clear of using an xml declaration if what
you're building is supposed to work in IE (no support for appli
AM, Sean McArthur wrote:
>
>
>
>
>
>
>
> > Nope. Just worked for me.
>
> > Sean McArthur
>
> > On Nov 17, 2010 8:21 AM, "rasmusfl0e" wrote:
>
> > Anyone else having trouble accessing mootools.net?
Anyone else having trouble accessing mootools.net?
lol :D
If you begin to type "mootools" it will suggest "dojo" all the way up
until get to the third "o"; "mooto" :P
But nice job anyway
On Oct 6, 12:37 pm, Adrian Statescu wrote:
> A String.method which calculates Levenshtein distance between two
> strings.
> Check this out on forge:http://moot
I think your problem might not be with Canvas Library (which I've
never heard of before now) - but more with the fact that you store
coordinates in a string(?).
At one point you're doing this:
positionCoordinates[grid_id] = x_cord + "," + y_cord; // let's say
"50,75"
and later you do this:
Am I the only one who gets a non-utf-8 encoded txt-file when
downloading More?
Non-ascii characters get botched - e.g æ, ø and å in Date.Danish :(
I'm assuming that the More source on github is utf-8.
How would you get ""/"odd" back as even/odd using that one liner?
"" || "even" would return "even"
On May 31, 2:56 pm, Michael Ficarra
wrote:
> A slightly faster one-liner:http://jsfiddle.net/Jm2Hb/9/
>
> Use &1 to check the last bit. It's faster than modding, especially for
> larger numbers.
>
I missed the part about the children having non-default positioning :(
But anywho - css can still be used to cure the problem; this shell
uses display inline-block http://jsfiddle.net/r3Lg5/ (which may or may
not be appropriate in reallife).
The links to hasLayout info was intended for anyone not
"hasLayout" can be triggered through css - no need to "polute" the
html with unnecessary attributes. :P
You can use a number of different approaches via css; setting a width
or height, floating an element... the list goes on. My favourite would
be using the MS proprietary "zoom" (only IE reads it):
The MooTools docs state:
* In order to share the Cookie with pages located in a different
path, the Cookie.options.domain value must be set.
Read The Friendly Manual :P
On Mar 10, 1:21 pm, woomla wrote:
> If I have a cookie in a subdirectory, this cookie is read from even
> when I'm in the roo
The way you've used RegExp will also match partial matches; you look
for "rump" and get a match on "scrump"... not good. False positives.
@Yann: The contains method you listed is the Array method - not String
one which looks like this:
contains: function(string, separator){
return (separa
Avoid unnecessary function calls. The following uses only 1 extra call
to hasClass:
Element.implement({
removeAllClassExcept: function(klass) {
this.className = this.hasClass(klass) ? klass : '';
return this;
}
});
Performance is better ("time4"): http://mootools.net/shel
dude - would you like to borrow the "var" keyword? :P
anyways... if you want performance avoid extra function calls when
they aren't needed. all of the above could be done much simpler - the
following example uses only 1 hasClass call:
Element.implement({
removeAllClassExcept: function(klass)
..or just use Window.getWidth() (notice uppercase W).
On Feb 23, 2:20 am, Anatol wrote:
> Hi,
>
> I added a few simple Mootools effects to a web page. All works well in
> Firefox, but (as expected) IE (tested in IE7) causes trouble for some
> but not all of the script.
>
> Here is a test page:htt
It just keeps getting better and better - also luvin the new design
(oskar's?)
On Oct 20, 1:27 pm, Piotr Zalewa wrote:
> 2009/10/20 Aaron Newton
>
> > Agreed, good stuff.http://mooshell.net/TZdp7/show<< no worky
>
> Usehttp://mooshell.net/TZdp7/show/forgotten about the slash on the end -
> sorr
So you're setting up javascript interaction with 300+ divs? That's a
lot of wasted cpu cycles; the user will most likely only interact with
30 of those divs (this is a mere guess).
Maybe "event delegation" would be a way to go? - only setting up js
for the html as the user interacts with a specif
"loan" is an object - you can't just concatenate it directly onto a
string. You need to pick out each piece of data from the loan object
you want to present:
var el = new Element('li', {'html': ''+
item.id+' '+
item.loan.name + ": " +
item.loan.loan_amount}).inject(liste);
Sounds like you need to seperate logic and content - event delegation
would be a way to go.
Keep keyboard navigation out of the DataBlock classes.
On May 5, 7:18 pm, rpflo wrote:
> Not sure if that's even what I should title this message.
>
> So I've got a class called DataBlock that's got some
$$("li:not('.myClass')")
On May 4, 4:58 am, rpflo wrote:
> I can do:
>
> $$('li:[class~=myClass]') and get the li's that have myClass within
> the space seperated list.
>
> But what if I wanted to select the ones *without* a class, (or rel, or
> name, or title) in a separated list?
>
> !~= woul
I'm guessing the browser has to move the image AND scale it at the
same - and this causes the hicups.
Why even scale the image when you're already scrolling around to view
it?
On Apr 29, 12:38 am, TheIvIaxx wrote:
> ok so i jumped the gun on ie being faster :)
>
> if the image is not scaled at
The incompatbility lies in nature of mootools; extending javascript.
This in turn exposes bad coding practices like using for (var ...
in ...) structures without doing hasOwnProprty filtering - especially
on Arrays. My guess is that this is what's throwing off IE7.
for (var t in taxes)
lo
the code you're trying to shoehorn into a mootools context is jquery
code... just copy/pasting code randomly won't get you far.
please take look at the blog post nwhite wrote - what you need is all
there.
On Feb 8, 3:09 am, "Erik R. Peterson" wrote:
> Has anyone successfully installed the lin
looks like you copied the jquery sample code and not the mootools
sample just below it.
On Feb 8, 3:09 am, "Erik R. Peterson" wrote:
> Has anyone successfully installed the link nudge?
>
> Erik
>
> On Feb 7, 2009, at 8:58 PM, Erik R. Peterson wrote:
>
>
>
> > I'm using mootools.
>
> > I removed:
and as a side note - picking a random color would very easy:
Var myRandomColor = new Color($random(0, 0xFF));
;)
On Jan 9, 10:15 pm, Sam wrote:
> function num2rgb(num)
> {
> var r = (num >> 16) & 0xFF;
> var g = (num >> 8) & 0xFF;
> var b = num & 0xFF;
>
> return [r,g,b];
>
> }
whatever DOM elements you replace you will also loose their respective
events. it doesn't matter whether they are replaced by elements
matching their tag, id and class.
either you re-apply the needed events to the new elements or you use
event delegation on a static parent element (an element tha
it's very hackable:
Secret.implement({
set: function(message){
secret = message;
}
});
msg.set("hello, world");
msg.get(); // returns "hello, world"
On Oct 10, 10:47 pm, "Nathan White" <[EMAIL PROTECTED]> wrote:
> ok. I have made two updates to my Privates Mutator.
>
> Now if you
the combination should be something like: display: table-cell /
display: none
On Oct 7, 11:37 pm, tr0y <[EMAIL PROTECTED]> wrote:
> I'm having a problem where the table cells collapse and get all wonky
> on a key event. Clearly I am doing something, but I can't seem to
> track down what it is.
*takes Jon's keys out of his hands and whistles for a cab*
On Oct 6, 9:21 pm, Jon Hack <[EMAIL PROTECTED]> wrote:
> I just want to raise my glass to MooTools core developer team. You
> guys have done some most excellent work with this framework and I am
> very grateful for what you have provided
while an opacity of 0 will make a div unclickable in IE - a div with a
transparent gif as background will go figure :/
why not just have the image be draggable inside a div with overflow
hidden?
On Sep 16, 11:17 pm, kfancy <[EMAIL PROTECTED]> wrote:
> Hi Nathan,
>
> Yes, that may seem like c
the first argument in your onSuccess IS the json object. which means
you could do this:
onSuccess: function(json){
alert(json.Zone); // should alert "Hekla"
alert(json.Gemeente); // should alert "Hove"
it couldn't be any easier! ;)
On Sep 10, 12:07 pm, Janec <[EM
51 matches
Mail list logo