[jQuery] Memory game

2007-01-04 Thread Peter Bengtsson
Has anybody written a game of Memory with jQuery that I can save myself a lot of work from? For those who can't remember how the game was played, here's an aweful example: http://www.queendom.com/mindgames/mindstretching/memory-games/memory-game1/index.html -- Peter Bengtsson, wo

[jQuery] Exception to an event

2007-01-10 Thread Peter Bengtsson
ation input").unbind(); but that didn't work. It triggers the "parent event" if you see what I mean. I also tried: $("div.registration input").unbind("click"); but neither with success. Anything obvious? Alternatively, is there a suitable XPath expressi

Re: [jQuery] Exception to an event

2007-01-10 Thread Peter Bengtsson
t;clicked anywhere in registration div except for input") > } > }); > Thanks! Works fine! > Untested... > > -- Klaus > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ >

[jQuery] .size() to test if something exists

2007-01-19 Thread Peter Bengtsson
Currently my code looks something like this: if ($('#warningmsg').size()) highlightWarningMsg(); Is that the "correct" way of testing if a jQuery object contains anything? -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.iss

Re: [jQuery] Trivial use

2007-01-23 Thread Peter Bengtsson
t; $("#content").append('<div class="test">click does not > work</div>'); > return false; > }); > }); > > (...) > http://www.site.com/"; id="trigger"&g

Re: [jQuery] Select Box

2007-01-25 Thread Peter Bengtsson
t; > Some example? > > > > Thk. > > Giro. > > > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.c

[jQuery] Id of a textarea element

2007-02-18 Thread Peter Bengtsson
>From the Firebug console... >>> document.getElementById('id_descriptions.sv'); >>> $('#id_descriptions.sv'); [] >>> $('#id_descriptions.sv').size(); 0 The XHTML validates so I don't see what's wrong with the ID valu

Re: [jQuery] Id of a textarea element

2007-02-19 Thread Peter Bengtsson
On 2/18/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Peter Bengtsson schrieb: > >>From the Firebug console... > >>>> document.getElementById('id_descriptions.sv'); > > > name="descriptions.sv:latin1:utext:record"> > >&g

Re: [jQuery] Id of a textarea element

2007-02-19 Thread Peter Bengtsson
eceded with a space or a tagname. > would only select the following element: > > > > > -- Klaus > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -

[jQuery] Move to an anchor

2007-03-27 Thread Peter Bengtsson
Can I move to an anchor with jQuery? I.e. the equivalent of what the browser does with: footer -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com

[jQuery] fadeOut for each

2006-12-01 Thread Peter Bengtsson
.rounded").each(function() { if(this.style['display']!='none') $(this).fadeOut(900); }) }, 1000*7); What do more experienced jQuery people think about that approach? Is that the easiest way to do it? -- Peter Bengtsson, work w

Re: [jQuery] fadeOut for each

2006-12-04 Thread Peter Bengtsson
is now, it will have to look at every element > in document.body to determine whether they are in the rounded class. That > ain't cheap on a big page. > I didn't know. I can be more specific and have now put $("div.rounded") instead.

Re: [jQuery] Elegant Loading Indicator

2006-12-08 Thread Peter Bengtsson
t"; > }); > > I like the unobtrusive simplicity. > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Elegant Loading Indicator

2006-12-08 Thread Peter Bengtsson
; this.style.cursor = "wait"; > }).ajaxStop(function() { > this.style.cursor = "default"; > }); > > I like the unobtrusive simplicity. > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

[jQuery] this.addClass("foo")??

2006-12-08 Thread Peter Bengtsson
quot;); // THIS DOESN'T WORK }); }); This doesn't work because 'this' is not a jQuery object I guess. How sould I do this then? -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

[jQuery] [Fwd: this.addClass("foo")??]

2006-12-08 Thread Peter Bengtsson
I figured it out. Use $(this) to convert 'this' to a jQuery object. Original Message Subject: this.addClass("foo")?? Date: Fri, 08 Dec 2006 17:40:26 + From: Peter Bengtsson <[EMAIL PROTECTED]> To: jQuery Discussion. Here's the code that doe

Re: [jQuery] jQuery 1.0.4 Released

2006-12-13 Thread Peter Bengtsson
e. > > $(document).mousemove(function(e){ > $("#mousetip").css({ > top: e.pageY + "px", > left: e.pageX + "px" > }); > }); > > Improved docs: $(String) method has now two separate descriptions, one > for selecting elements, one for creating html on-the-fly. > > FX module: Most inline styles added by animations are now removed when > the animation is complete, eg. height style when animating height > (exception: display styles). > > (This message can also be found here: > http://jquery.com/blog/2006/12/12/jquery-104/) > > --John > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Simple code, but not working with IE 6 / 7

2006-12-14 Thread Peter Bengtsson
$("div#description").css({display:"none"}); $("div#map").show("slow"); }); $("a.ShowImage").click( function(){ $("div#map").css({display:"none"}); $("di