Eneko Alonso wrote:
>
> > You pretty much had it but it is way more simple than that:
>
> > String.implement({
> > toElement: function() {
> > return new Element('div', {html:this}).getFirst();
> > }
>
> > });
>
> > alert(&
case
> $$('span').filter(function (el) {
>
> //
>
>
>
> })
> On Wed, Sep 2, 2009 at 4:30 PM, atwork8 wrote:
>
> > Hi,
>
> > How do you escape characters in a selector? I can't find any info in
> > the docs e.g.
>
> > I am a span
rt('hello'.toElement().get('id'));
> alert('Mootools'.toElement().get('href'));
>
> I like it!
>
> On Tue, Sep 1, 2009 at 1:51 AM, atwork8 wrote:
>
> > Maybe String is a better place for it?
>
> > String.
Hi,
How do you escape characters in a selector? I can't find any info in
the docs e.g.
I am a span
alert($$('.someValue:anotherValue')[0].get('tag'));
alert($$('.someValue\:anotherValue')[0].get('tag'));
alert($$('.someValue\\:anotherValue')[0].get('tag'));
alert($$('.someValue\3A anotherValue'
Maybe String is a better place for it?
String.implement({
toElement: (function() {
var div = new Element('div');
return function() {
div.set('html', this);
return div.getFirst();
}
})()
r just:
>
> return new Element( 'div', { html: _str });
>
> in constructor.
>
> On Aug 31, 7:49 pm, atwork8 wrote:
>
> > Hi,
>
> > I thought the Element constructor might accept an html string and
> > return an element, but unfortunately it doesn
r just:
>
> return new Element( 'div', { html: _str });
>
> in constructor.
>
> On Aug 31, 7:49 pm, atwork8 wrote:
>
> > Hi,
>
> > I thought the Element constructor might accept an html string and
> > return an element, but unfortunately it doesn
Hi,
I thought the Element constructor might accept an html string and
return an element, but unfortunately it doesn't. I tried to extend
Element into itself so that I could add this functionality, but it
doesn't seem to like that either. Are there currently any functions
that return an element fr
you have the references for the node you want to adopt it will be almost
> the same thing as set/get html.
>
> @atwork8, just testing, is "Please, shut the fuck up" rude for you?
>
> --
> Fábio Miranda Costa
> Solucione Sistemas
> Front-End Engineerhttp://mei
one liner) you could implement your own
> method on element.
>
> Element.implement({
> wrapContent : function(el){
> this.adopt($(el).getChildren()).inject(el);
> }
> });
>
> usage:
>
> new Element('div',{ 'id'
he wrapper div in
> > your html?"
>
> Sometimes you don't have full control over the html generation.
>
> @atwork8 I thought your tone was a bit rude especially when your asking for
> help. A bit of diplomacy will get you farther.
>
> I would use adopt since it
d":"wrapper"}).set("html",
> $(document.body).get("html")).inject($(document.body).empty())
>
> You ask if what you showed is the best way? For me...if it works then great
> :)
>
> -Original Message-
> From: atwork8 [mailto:atwo...@hotmail.c
@ksamdev - If there aren't really any benefits I think I'll stick with
the shorter version. Thanks for your help.
On Aug 27, 4:00 pm, ksamdev wrote:
> @atwork8
>
> No benefits. The result would be the same except that work is done
> with DOM objects directly if you do thi
:
>
> var _div = new Element( 'div');
> var _body = $( document.body);
> _body.getChildren().each( function( _item) { _div.grab( _item); });
> _body.adopt( _div);
>
> On Aug 27, 7:22 am, atwork8 wrote:
>
> > @ksamdev - Could you please read the problem.
@Fabio - I'm not being rude. I asked a simple question which you
didn't read properly, I asked if you could read it again. The answer
you provided is the opposite of what I asked.
@ksamdev - Could you please read the problem. The results are
completely different. The solution I've provided generates this:
body's html
Fabio's generates:
body's html
@Fabio - Could you please read the problem before providing an answer.
woops! there are 9 :o)
On Feb 28, 9:30 pm, atwork8 wrote:
> For anybody that is interested I've updated these tests and there are
> now 8 implementations being compared:
>
> * j3 Class - (projectcss.net)
> * jClass - (ejohn.org)
> * base2 Class - (dean.edwards
For anybody that is interested I've updated these tests and there are
now 8 implementations being compared:
* j3 Class - (projectcss.net)
* jClass - (ejohn.org)
* base2 Class - (dean.edwards.name)
* mooTools Class - (mootools.net)
* Prototype Class - (prototypejs.org)
* Do
I created this recently to test my own class implementation. Wasn't
sure if it was of interest to anybody? I've posted it up anyway. It
tests against mootools, prototype, jClass etc
http://www.projectcss.net/inheritance/
Hi all,
I created a Parent class, and then a Child class that Extends Parent.
If I give both classes a toString() method, the Child class always
calls the Parent toString() method and not its own version. It works
fine in firefox.
I'm guessing it has something to do with the "DontEnum bug"
worka
Congrats on the release!! :o)
Hi,
The Official F1 site uses MooTools: http://www.formula1.com/
Not sure how big F1 is in the US but here in Europe it's a massive
sport! Would be excellent for the MooTools profile, just a thought for
any of the MooTools officials out there.
Cheers :o)
23 matches
Mail list logo