need help for port jquery to mootoools

54 views
Skip to first unread message

Hamburger

unread,
Oct 2, 2012, 10:54:28 AM10/2/12
to mootool...@googlegroups.com
Hello,
I'am trying to translate the following code.
I have some problems:
Why gives the function grabPixelFontSize different values in jq an moo?
Also the finalText is different. I don't understand why?

Here my moo-code:
http://jsfiddle.net/vpNKB/3/

the jquery-code:
http://jsfiddle.net/w2E9y/2/

thx for any suggestion in advance

Hamburger

unread,
Oct 2, 2012, 11:21:24 AM10/2/12
to mootool...@googlegroups.com
here is only the grabPixelFontSize code

jq == http://jsfiddle.net/t6gcG/1/
moo == http://jsfiddle.net/V3XRM/2/


g.schlmm

unread,
Oct 2, 2012, 3:01:57 PM10/2/12
to mootool...@googlegroups.com
hi,
you example works, if you do
line-height: '1'
(mootool using pixels if u not explicity put a value of type string)
and if u use y instead of of x from your size thingie
(you want the height, right?)

also why not just do:
myEl.inject(document.body);
instead of:
myEl.inject(_this);

next:
return myEL.getSize().y;
should work?

Hamburger

unread,
Oct 3, 2012, 6:38:05 AM10/3/12
to mootool...@googlegroups.com, g.sc...@googlemail.com
Hello and thx for your hint.
I have it.
I think getSize().y would'nt work because the element is hidden ...
cheers hamburger

Philip Thompson

unread,
Oct 3, 2012, 10:34:56 AM10/3/12
to mootool...@googlegroups.com
Element.measure will help you there. http://mootools.net/docs/more/Element/Element.Measure

~Philip
Reply all
Reply to author
Forward
0 new messages